Class: Measured::V

Inherits:
Object
  • Object
show all
Defined in:
lib/pve/helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lengthObject (readonly)

Returns the value of attribute length.



17
18
19
# File 'lib/pve/helper.rb', line 17

def length
  @length
end

#valueObject (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

#inspectObject



20
# File 'lib/pve/helper.rb', line 20

def inspect() "#<Measured::V #{@value.inspect} (#{@length})>" end