Class: HatebuWatcher::Parameters
- Inherits:
-
Object
- Object
- HatebuWatcher::Parameters
- Defined in:
- lib/hatebu_watcher/parameters.rb
Instance Attribute Summary collapse
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(params) ⇒ Parameters
constructor
A new instance of Parameters.
Constructor Details
#initialize(params) ⇒ Parameters
Returns a new instance of Parameters.
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
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
5 6 7 |
# File 'lib/hatebu_watcher/parameters.rb', line 5 def interval @interval end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/hatebu_watcher/parameters.rb', line 5 def url @url end |