Class: Wayfarer::Task
- Inherits:
-
Object
- Object
- Wayfarer::Task
- Extended by:
- Forwardable
- Includes:
- Stringify
- Defined in:
- lib/wayfarer/task.rb
Instance Attribute Summary collapse
-
#batch ⇒ String
readonly
The batch the task belongs to.
-
#url ⇒ String
readonly
The URL to process.
Method Summary
Methods included from Stringify
Instance Attribute Details
#batch ⇒ String (readonly)
Returns the batch the task belongs to.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/wayfarer/task.rb', line 8 class Task extend Forwardable include Stringify attr_reader :url, :batch stringify :url, :batch delegate %i([] []=) => :@ephemeral # @!visibility private def initialize(url, batch) @url = url @batch = batch @ephemeral = {} end # @!visibility private def ==(other) [url, batch] == [other.url, other.batch] end end |
#url ⇒ String (readonly)
Returns the URL to process.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/wayfarer/task.rb', line 8 class Task extend Forwardable include Stringify attr_reader :url, :batch stringify :url, :batch delegate %i([] []=) => :@ephemeral # @!visibility private def initialize(url, batch) @url = url @batch = batch @ephemeral = {} end # @!visibility private def ==(other) [url, batch] == [other.url, other.batch] end end |