Class: StoreAsInt::Money
Constant Summary collapse
- ACCURACY =
Constants ============================================================
2- DECIMALS =
2- SYM =
'$'
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.extend_numerics ⇒ Object
Class Methods ========================================================.
Instance Method Summary collapse
-
#dollar_str ⇒ Object
Instance Methods =====================================================.
- #to_cents ⇒ Object
Methods inherited from Base
#<=>, #==, #===, ===, accuracy, #accuracy, #as_json, #base, base, #base_float, #coerce, #convert, #decimals, decimals, #dup, #duplicable?, #initialize, #inspect, #instance_of?, #is_a?, #is_an?, #kind_of?, matcher, #matcher, #method_missing, #negative_sign, operators, #operators, #present?, str_format, sym, #sym, #sym=, #to_d, #to_f, #to_h, #to_i, #to_json, #to_s, #value
Constructor Details
This class inherits a constructor from StoreAsInt::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class StoreAsInt::Base
Class Method Details
.extend_numerics ⇒ Object
Class Methods ========================================================
20 21 22 |
# File 'lib/store_as_int/money.rb', line 20 def self.extend_numerics Numeric.include StoreAsInt::ActsAsMoneyInt end |
Instance Method Details
#dollar_str ⇒ Object
Instance Methods =====================================================
28 29 30 |
# File 'lib/store_as_int/money.rb', line 28 def dollar_str to_s(true) end |
#to_cents ⇒ Object
32 33 34 |
# File 'lib/store_as_int/money.rb', line 32 def to_cents self end |