Class: TimeArray::Compact

Inherits:
Object
  • Object
show all
Defined in:
lib/time_array/compactor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(v, unit) ⇒ Compact

Returns a new instance of Compact.



6
7
8
9
# File 'lib/time_array/compactor.rb', line 6

def initialize(v, unit)
  @v    = v
  @unit = unit
end

Instance Attribute Details

#unitObject (readonly)

Returns the value of attribute unit.



5
6
7
# File 'lib/time_array/compactor.rb', line 5

def unit
  @unit
end

#vObject (readonly) Also known as: values, array

Returns the value of attribute v.



5
6
7
# File 'lib/time_array/compactor.rb', line 5

def v
  @v
end