Method: Interval#construction

Defined in:
lib/interval.rb

#constructionObject

Returns a list of the parameters that can be used to reconstruct the interval.

a = Interval[1,2]        # => Interval[1, 2]
b = a.construction       # => [1, 2]
Interval[*b] == a        # => true


114
115
116
# File 'lib/interval.rb', line 114

def construction
  map{|x| x.extrema.uniq}
end