Class: Unitwise::Prefix

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

Instance Attribute Summary collapse

Attributes inherited from Base

#names, #primary_code, #scale, #secondary_code, #symbol

Class Method Summary collapse

Methods inherited from Base

all, find, find_by, #initialize, #slugs

Constructor Details

This class inherits a constructor from Unitwise::Base

Instance Attribute Details

#scalarObject

Returns the value of attribute scalar.



3
4
5
# File 'lib/unitwise/prefix.rb', line 3

def scalar
  @scalar
end

Class Method Details

.dataObject



5
6
7
# File 'lib/unitwise/prefix.rb', line 5

def self.data
  @data ||= YAML::load File.open(data_file)
end

.data_fileObject



9
10
11
# File 'lib/unitwise/prefix.rb', line 9

def self.data_file
  Unitwise.data_file 'prefix'
end