Class: Pongo::Interval

Inherits:
Object
  • Object
show all
Defined in:
lib/pongo/util/interval.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#maxObject

Returns the value of attribute max.



3
4
5
# File 'lib/pongo/util/interval.rb', line 3

def max
  @max
end

#minObject

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_sObject



9
10
11
# File 'lib/pongo/util/interval.rb', line 9

def to_s
  "#{@min} : #{@max}"
end