Class: ZMediumFetcher::Progress
- Inherits:
-
Object
- Object
- ZMediumFetcher::Progress
- Defined in:
- lib/ZMediumFetcher.rb
Instance Attribute Summary collapse
-
#currentPostIndex ⇒ Object
Returns the value of attribute currentPostIndex.
-
#currentPostParagraphIndex ⇒ Object
Returns the value of attribute currentPostParagraphIndex.
-
#message ⇒ Object
Returns the value of attribute message.
-
#postPath ⇒ Object
Returns the value of attribute postPath.
-
#totalPostParagraphsLength ⇒ Object
Returns the value of attribute totalPostParagraphsLength.
-
#totalPostsLength ⇒ Object
Returns the value of attribute totalPostsLength.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#currentPostIndex ⇒ Object
Returns the value of attribute currentPostIndex.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def currentPostIndex @currentPostIndex end |
#currentPostParagraphIndex ⇒ Object
Returns the value of attribute currentPostParagraphIndex.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def currentPostParagraphIndex @currentPostParagraphIndex end |
#message ⇒ Object
Returns the value of attribute message.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def @message end |
#postPath ⇒ Object
Returns the value of attribute postPath.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def postPath @postPath end |
#totalPostParagraphsLength ⇒ Object
Returns the value of attribute totalPostParagraphsLength.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def totalPostParagraphsLength @totalPostParagraphsLength end |
#totalPostsLength ⇒ Object
Returns the value of attribute totalPostsLength.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def totalPostsLength @totalPostsLength end |
#username ⇒ Object
Returns the value of attribute username.
41 42 43 |
# File 'lib/ZMediumFetcher.rb', line 41 def username @username end |
Instance Method Details
#printLog ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ZMediumFetcher.rb', line 43 def printLog() info = "" if !username.nil? if !currentPostIndex.nil? && !totalPostsLength.nil? info += "[#{username}(#{currentPostIndex}/#{totalPostsLength})]" else info += "[#{username}]" end end if !postPath.nil? info += "-" if info != "" if !currentPostParagraphIndex.nil? && !totalPostParagraphsLength.nil? info += "[#{postPath[0..15]}...(#{currentPostParagraphIndex}/#{totalPostParagraphsLength})]" else info += "[#{postPath[0..15]}...]" end end if !.nil? info += "-" if info != "" info += end puts info if info != "" end |