Skip to content

Commit

Permalink
Generate yaml files with BigDecimal or Integer exclusively
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlewis committed Jul 7, 2017
1 parent a77514a commit 40c5a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/unitwise/standard/prefix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ def self.remote_key
end

def scale
Unitwise::Number.simplify(attributes["value"].attributes["value"])
Unitwise::Number.coefficify(
attributes.fetch('value').attributes.fetch('value')
)
end

def to_hash
super().merge(:scalar => scale)
end

end
end
2 changes: 1 addition & 1 deletion lib/unitwise/standard/scale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(nori)
end

def value
Unitwise::Number.simplify(nori.attributes["value"])
Unitwise::Number.coefficify(nori.attributes.fetch('value'))
end

def primary_unit_code
Expand Down

0 comments on commit 40c5a8a

Please sign in to comment.