Class: ApiQueryLanguage::Filtering::FilterExpression
- Inherits:
-
Object
- Object
- ApiQueryLanguage::Filtering::FilterExpression
- Defined in:
- lib/api_query_language/filtering/filter_expression.rb
Instance Attribute Summary collapse
-
#ast_root ⇒ Object
readonly
Returns the value of attribute ast_root.
-
#field_to_attribute_mappings ⇒ Object
readonly
Returns the value of attribute field_to_attribute_mappings.
-
#query_expression ⇒ Object
readonly
Returns the value of attribute query_expression.
Instance Method Summary collapse
-
#initialize(query_expression, field_to_attribute_mappings = {}) ⇒ FilterExpression
constructor
A new instance of FilterExpression.
- #to_s ⇒ Object
Constructor Details
#initialize(query_expression, field_to_attribute_mappings = {}) ⇒ FilterExpression
Returns a new instance of FilterExpression.
4 5 6 7 8 |
# File 'lib/api_query_language/filtering/filter_expression.rb', line 4 def initialize(query_expression, field_to_attribute_mappings = {}) @query_expression = query_expression @field_to_attribute_mappings = field_to_attribute_mappings parse_expression! end |
Instance Attribute Details
#ast_root ⇒ Object (readonly)
Returns the value of attribute ast_root.
10 11 12 |
# File 'lib/api_query_language/filtering/filter_expression.rb', line 10 def ast_root @ast_root end |
#field_to_attribute_mappings ⇒ Object (readonly)
Returns the value of attribute field_to_attribute_mappings.
10 11 12 |
# File 'lib/api_query_language/filtering/filter_expression.rb', line 10 def field_to_attribute_mappings @field_to_attribute_mappings end |
#query_expression ⇒ Object (readonly)
Returns the value of attribute query_expression.
10 11 12 |
# File 'lib/api_query_language/filtering/filter_expression.rb', line 10 def query_expression @query_expression end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/api_query_language/filtering/filter_expression.rb', line 12 def to_s "#{self.class.name}(filter_expression: '#{query_expression}')" end |