Class: FilterParam::AST::Literals::Decimal
- Inherits:
-
Integer
- Object
- Node
- FilterParam::AST::Literal
- Integer
- FilterParam::AST::Literals::Decimal
- Defined in:
- lib/filter_param/ast/literals/decimal.rb
Instance Attribute Summary
Attributes inherited from FilterParam::AST::Literal
Instance Method Summary collapse
- #data_type ⇒ Object
-
#initialize(value) ⇒ Decimal
constructor
A new instance of Decimal.
Methods inherited from FilterParam::AST::Literal
Methods inherited from Node
Constructor Details
#initialize(value) ⇒ Decimal
7 8 9 10 11 |
# File 'lib/filter_param/ast/literals/decimal.rb', line 7 def initialize(value) @value = BigDecimal(value.to_s) rescue ArgumentError raise InvalidLiteral.new("Invalid Decimal: #{value}") end |
Instance Method Details
#data_type ⇒ Object
13 14 15 |
# File 'lib/filter_param/ast/literals/decimal.rb', line 13 def data_type :decimal end |