Class: Pongo::Interval
- Inherits:
-
Object
- Object
- Pongo::Interval
- Defined in:
- lib/pongo/util/interval.rb
Instance Attribute Summary collapse
-
#max ⇒ Object
Returns the value of attribute max.
-
#min ⇒ Object
Returns the value of attribute min.
Instance Method Summary collapse
-
#initialize(min = 0, max = 0) ⇒ Interval
constructor
A new instance of Interval.
- #to_s ⇒ Object
Constructor Details
#initialize(min = 0, max = 0) ⇒ Interval
Returns a new instance of Interval.
5 6 7 |
# File 'lib/pongo/util/interval.rb', line 5 def initialize(min=0, max=0) @min, @max = min, max end |
Instance Attribute Details
#max ⇒ Object
Returns the value of attribute max.
3 4 5 |
# File 'lib/pongo/util/interval.rb', line 3 def max @max end |
#min ⇒ Object
Returns the value of attribute min.
3 4 5 |
# File 'lib/pongo/util/interval.rb', line 3 def min @min end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/pongo/util/interval.rb', line 9 def to_s "#{@min} : #{@max}" end |