Sha256: ba827b2bb4d5f31df978e18563678a930d6192eeadaa584dac0fee6c36f9e4b3
Contents?: true
Size: 602 Bytes
Versions: 25
Compression:
Stored size: 602 Bytes
Contents
module GreenButtonData module Parser class RationalNumber include SAXMachine element :numerator, class: Integer element :denominator, class: Integer def to_f @numerator / @denominator end # ESPI Namespacing element :'espi:numerator', class: Integer, as: :numerator element :'espi:denominator', class: Integer, as: :denominator # Special case for PG&E which uses generic namespacing element :'ns0:numerator', class: Integer, as: :numerator element :'ns0:denominator', class: Integer, as: :denominator end end end
Version data entries
25 entries across 25 versions & 1 rubygems