Class: Interval::Multiple
Overview
Implements an interval with multiple components.
Constant Summary
Constants inherited from Interval
E, NewtonOptions, PI
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, #degenerate?, #empty?, eval, #exp, #hull, #include?, #inspect, #inverse, #log, #newton, #op, #sharp?, #simple?, #sin, #sinh, sum, #tan, #to_interval, #to_s, union, #|
Constructor Details
#initialize(array) ⇒ Multiple
:nodoc:
739 740 741 742 |
# File 'lib/interval.rb', line 739 def initialize (array) # :nodoc: @components = array freeze end |
Instance Attribute Details
#components ⇒ Object (readonly)
The array with the interval’s components.
737 738 739 |
# File 'lib/interval.rb', line 737 def components @components end |
Instance Method Details
#each ⇒ Object
Implements Enumerable#each.
745 746 747 748 |
# File 'lib/interval.rb', line 745 def each components.each { |o| yield(o) } self end |