Class: HatebuWatcher::Parameters

Inherits:
Object
  • Object
show all
Defined in:
lib/hatebu_watcher/parameters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Parameters

Returns a new instance of Parameters.

Raises:

  • (ArgumentError)


7
8
9
10
11
12
# File 'lib/hatebu_watcher/parameters.rb', line 7

def initialize(params)
  @url      = params[0]
  @interval = params[1].to_i

  raise ArgumentError unless valid?
end

Instance Attribute Details

#intervalObject (readonly)

Returns the value of attribute interval.



5
6
7
# File 'lib/hatebu_watcher/parameters.rb', line 5

def interval
  @interval
end

#urlObject (readonly)

Returns the value of attribute url.



5
6
7
# File 'lib/hatebu_watcher/parameters.rb', line 5

def url
  @url
end