From 4ede468c752d6493ee28364975782fa64444aa4c Mon Sep 17 00:00:00 2001 From: ruidajo Date: Sun, 26 May 2024 13:44:40 -0500 Subject: [PATCH] Renaming temp variable in urlCheck: --- Instagram/InstagramUrl.class.st | 29 +++++++++++++++-------------- Instagram/package.st | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Instagram/InstagramUrl.class.st b/Instagram/InstagramUrl.class.st index b6a2b5a..5ba4017 100644 --- a/Instagram/InstagramUrl.class.st +++ b/Instagram/InstagramUrl.class.st @@ -4,15 +4,16 @@ I manage instagram URLs information. InstagramUrl newURL: 'https://instagram.com/restOfURL' " Class { - #name : #InstagramUrl, - #superclass : #Object, + #name : 'InstagramUrl', + #superclass : 'Object', #instVars : [ 'url' ], - #category : #Instagram + #category : 'Instagram', + #package : 'Instagram' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } InstagramUrl class >> newURL: url [ | instance | instance := self new. @@ -20,7 +21,7 @@ InstagramUrl class >> newURL: url [ ^ instance ] -{ #category : #initialization } +{ #category : 'initialization' } InstagramUrl >> initialize [ | initial | initial := 'https://www.instagram.com' asUrl. @@ -30,37 +31,37 @@ InstagramUrl >> initialize [ ] -{ #category : #opening } +{ #category : 'opening' } InstagramUrl >> openWithoutTracking [ WebBrowser openOn: self urlWithoutTracking ] -{ #category : #accessing } +{ #category : 'accessing' } InstagramUrl >> url [ ^ url ] -{ #category : #accessing } +{ #category : 'accessing' } InstagramUrl >> url: aURL [ url := aURL ] -{ #category : #testing } -InstagramUrl >> urlCheck: aURL [ +{ #category : 'testing' } +InstagramUrl >> urlCheck: aURLString [ | urlCheck | - (aURL includesSubstring: 'instagram.com') - ifFalse: [ UIManager default inform: '" ', aURL, ' " it''s not an instagram URL.'. + (aURLString includesSubstring: 'instagram.com') + ifFalse: [ UIManager default inform: '" ', aURLString, ' " it''s not an instagram URL.'. ^ self url]. - urlCheck := aURL asUrl. + urlCheck := aURLString asUrl. urlCheck hasHost ifFalse: [ urlCheck host: urlCheck segments first. urlCheck removeFirstPathSegment. ]. urlCheck hasScheme ifFalse: [ urlCheck scheme: 'https' ]. ^ urlCheck ] -{ #category : #accessing } +{ #category : 'accessing' } InstagramUrl >> urlWithoutTracking [ ^ self url queryRemoveAll; asStringOrText ] diff --git a/Instagram/package.st b/Instagram/package.st index 898c19b..3b001b5 100644 --- a/Instagram/package.st +++ b/Instagram/package.st @@ -1 +1 @@ -Package { #name : #Instagram } +Package { #name : 'Instagram' }