Class: Hal4R::Vector
Instance Attribute Summary collapse
-
#vector ⇒ Object
readonly
Returns the value of attribute vector.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(vector) ⇒ Vector
constructor
A new instance of Vector.
- #inspect ⇒ Object
Constructor Details
#initialize(vector) ⇒ Vector
Returns a new instance of Vector.
33 34 35 |
# File 'lib/hal4r/vector.rb', line 33 def initialize(vector) @vector = vector end |
Instance Attribute Details
#vector ⇒ Object (readonly)
Returns the value of attribute vector.
37 38 39 |
# File 'lib/hal4r/vector.rb', line 37 def vector @vector end |
Instance Method Details
#each(&block) ⇒ Object
39 40 41 |
# File 'lib/hal4r/vector.rb', line 39 def each(&block) block ? vector.each(&block) : enum_for(:each) end |
#inspect ⇒ Object
43 44 45 46 47 |
# File 'lib/hal4r/vector.rb', line 43 def inspect '#<%s:0x%x @vector=%p>' % [ self.class, object_id, vector ] end |