Class: Unitwise::Standard::BaseUnit

Inherits:
Base
  • Object
show all
Defined in:
lib/unitwise/standard/base_unit.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, hash, #initialize, local_key, #names, path, #primary_code, read, #secondary_code, #symbol, write

Methods included from Extras

#hash_to_markup

Constructor Details

This class inherits a constructor from Unitwise::Standard::Base

Class Method Details

.remote_keyObject



4
5
6
# File 'lib/unitwise/standard/base_unit.rb', line 4

def self.remote_key
  "base_unit"
end

Instance Method Details

#dimObject



12
13
14
# File 'lib/unitwise/standard/base_unit.rb', line 12

def dim
  attributes["@dim"]
end

#propertyObject



8
9
10
# File 'lib/unitwise/standard/base_unit.rb', line 8

def property
  attributes["property"].to_s
end

#to_hashObject



16
17
18
# File 'lib/unitwise/standard/base_unit.rb', line 16

def to_hash
  super.merge :property => property, :dim => dim
end