Class: Unitwise::Standard::Prefix
- Inherits:
-
Base
- Object
- Base
- Unitwise::Standard::Prefix
show all
- Defined in:
- lib/unitwise/standard/prefix.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
Class Method Details
.remote_key ⇒ Object
4
5
6
|
# File 'lib/unitwise/standard/prefix.rb', line 4
def self.remote_key
"prefix"
end
|
Instance Method Details
#scale ⇒ Object
8
9
10
11
12
|
# File 'lib/unitwise/standard/prefix.rb', line 8
def scale
Unitwise::Number.coefficify(
attributes.fetch('value').attributes.fetch('value')
)
end
|
#to_hash ⇒ Object
14
15
16
|
# File 'lib/unitwise/standard/prefix.rb', line 14
def to_hash
super().merge(:scalar => scale)
end
|