Class: Measured::V
- Inherits:
-
Object
- Object
- Measured::V
- Defined in:
- lib/pve/helper.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#value ⇒ Object
(also: #to_s, #to_str)
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, length = nil) ⇒ V
constructor
A new instance of V.
- #inspect ⇒ Object
Constructor Details
#initialize(value, length = nil) ⇒ V
Returns a new instance of V.
19 |
# File 'lib/pve/helper.rb', line 19 def initialize( value, length = nil) @value, @length = value, length || value.length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
17 18 19 |
# File 'lib/pve/helper.rb', line 17 def length @length end |
#value ⇒ Object (readonly) Also known as: to_s, to_str
Returns the value of attribute value.
17 18 19 |
# File 'lib/pve/helper.rb', line 17 def value @value end |
Instance Method Details
#inspect ⇒ Object
20 |
# File 'lib/pve/helper.rb', line 20 def inspect() "#<Measured::V #{@value.inspect} (#{@length})>" end |