Class: Interval::Multiple
Overview
Implements an interval with multiple components.
Constant Summary
Constants inherited from Interval
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
The array with the interval’s components.
Instance Method Summary collapse
-
#each ⇒ Object
Implements Enumerable#each.
-
#initialize(array) ⇒ Multiple
constructor
:nodoc:.
Methods inherited from Interval
#&, #*, #**, #+, #-, #-@, #/, #==, [], #atan, #coerce, #construction, #cos, #cosh, #empty?, #exp, #hull, #include?, #inspect, #inverse, #log, make, #newton, #op, #sharp?, #simple?, #sin, #sinh, #tan, #to_interval, #to_s, #|
Constructor Details
#initialize(array) ⇒ Multiple
:nodoc:
683 684 685 686 |
# File 'lib/interval.rb', line 683 def initialize (array) # :nodoc: @components = array freeze end |
Instance Attribute Details
#components ⇒ Object (readonly)
The array with the interval’s components.
681 682 683 |
# File 'lib/interval.rb', line 681 def components @components end |
Instance Method Details
#each ⇒ Object
Implements Enumerable#each.
689 690 691 692 |
# File 'lib/interval.rb', line 689 def each components.each { |o| yield(o) } self end |