Class: Flickrage::Worker::Base
- Inherits:
-
Object
- Object
- Flickrage::Worker::Base
- Includes:
- Helpers::Log, Helpers::Tty
- Defined in:
- lib/flickrage/worker/base.rb
Constant Summary collapse
- MAX_ASK_ERRORS =
3- PRINT_IMAGE_HEADERS_LITE =
%w(keyword id).freeze
- PRINT_IMAGE_HEADERS =
PRINT_IMAGE_HEADERS_LITE + %w(url title width height)
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
-
#service ⇒ Object
Returns the value of attribute service.
-
#spin ⇒ Object
Returns the value of attribute spin.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(opts = {}, service = nil) ⇒ Base
constructor
A new instance of Base.
Methods included from Helpers::Tty
Methods included from Helpers::Log
Constructor Details
#initialize(opts = {}, service = nil) ⇒ Base
Returns a new instance of Base.
18 19 20 21 22 23 |
# File 'lib/flickrage/worker/base.rb', line 18 def initialize(opts = {}, service = nil) @service = service @opts = default_opts.merge(opts) @spin = nil @opts[:ask_error_counter] = 0 end |
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts.
16 17 18 |
# File 'lib/flickrage/worker/base.rb', line 16 def opts @opts end |
#service ⇒ Object
Returns the value of attribute service.
16 17 18 |
# File 'lib/flickrage/worker/base.rb', line 16 def service @service end |
#spin ⇒ Object
Returns the value of attribute spin.
16 17 18 |
# File 'lib/flickrage/worker/base.rb', line 16 def spin @spin end |
Instance Method Details
#call ⇒ Object
25 |
# File 'lib/flickrage/worker/base.rb', line 25 def call; end |