Sha256: c4c2c6b79809cc0915c9be0c0ca0c789628786db5efc5855653e9f57ec5534be

Contents?: true

Size: 397 Bytes

Versions: 2

Compression:

Stored size: 397 Bytes

Contents

require 'enumeration'
require 'osheet/format/numeric'

module Osheet::Format

  class Currency < Osheet::Format::Numeric
    def initialize(opts={})
      super({
        :symbol => 'dollar',
        :decimal_places => 2,
        :comma_separator => true
      }.merge(opts))
    end

    protected

    # used by 'key' in Numeric base class
    def key_prefix
      "currency"
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
osheet-1.0.0.rc.4 lib/osheet/format/currency.rb
osheet-1.0.0.rc.3 lib/osheet/format/currency.rb