Class: NodeQuery::Compiler::Integer
- Inherits:
-
Object
- Object
- NodeQuery::Compiler::Integer
- Includes:
- Comparable
- Defined in:
- lib/node_query/compiler/integer.rb
Overview
Integer represents a ruby integer value.
Constant Summary
Constants included from Comparable
Comparable::ARRAY_VALID_OPERATORS, Comparable::NUMBER_VALID_OPERATORS, Comparable::REGEXP_VALID_OPERATORS, Comparable::SIMPLE_VALID_OPERATORS, Comparable::STRING_VALID_OPERATORS
Instance Method Summary collapse
-
#initialize(value:) ⇒ Integer
constructor
Initialize a Integer.
- #to_s ⇒ Object
-
#valid_operators ⇒ Array
Get valid operators.
Methods included from Comparable
#actual_value, #expected_value, #is_equal?, #match?, #valid_operator?
Constructor Details
#initialize(value:) ⇒ Integer
Initialize a Integer.
10 11 12 |
# File 'lib/node_query/compiler/integer.rb', line 10 def initialize(value:) @value = value end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/node_query/compiler/integer.rb', line 20 def to_s @value.to_s end |
#valid_operators ⇒ Array
Get valid operators.
16 17 18 |
# File 'lib/node_query/compiler/integer.rb', line 16 def valid_operators NUMBER_VALID_OPERATORS end |