Class: Chrono::Iterator
- Inherits:
-
Object
- Object
- Chrono::Iterator
- Defined in:
- lib/chrono/iterator.rb
Instance Attribute Summary collapse
-
#now ⇒ Object
Returns the value of attribute now.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source, options = {}) ⇒ Iterator
constructor
A new instance of Iterator.
- #next ⇒ Object
Constructor Details
#initialize(source, options = {}) ⇒ Iterator
Returns a new instance of Iterator.
7 8 9 10 |
# File 'lib/chrono/iterator.rb', line 7 def initialize(source, = {}) @source = source @now = [:now] || Time.now end |
Instance Attribute Details
#now ⇒ Object
Returns the value of attribute now.
3 4 5 |
# File 'lib/chrono/iterator.rb', line 3 def now @now end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/chrono/iterator.rb', line 5 def source @source end |