Class: Interval::Multiple
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(array) ⇒ Multiple
constructor
A new instance of Multiple.
Methods inherited from Interval
#+, #==, [], #^, #coerce, #construction, #degenerate?, #empty?, #hull, #include?, #inspect, #simple?, #to_interval, #to_s, #union, union, #|
Constructor Details
#initialize(array) ⇒ Multiple
Returns a new instance of Multiple.
193 194 195 196 |
# File 'lib/borel/interval.rb', line 193 def initialize(array) @components = array freeze end |
Instance Attribute Details
#components ⇒ Object (readonly)
Returns the value of attribute components.
191 192 193 |
# File 'lib/borel/interval.rb', line 191 def components @components end |
Instance Method Details
#each ⇒ Object
198 199 200 201 |
# File 'lib/borel/interval.rb', line 198 def each components.each{|o| yield(o)} self end |