Class: Wayfarer::Task

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Stringify
Defined in:
lib/wayfarer/task.rb

Instance Attribute Summary collapse

Method Summary

Methods included from Stringify

#to_s

Instance Attribute Details

#batchString (readonly)

Returns the batch the task belongs to.

Returns:

  • (String)

    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

#urlString (readonly)

Returns the URL to process.

Returns:

  • (String)

    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