Class: SQLSearch::Atoms::UnaryScalar

Inherits:
Scalar
  • Object
show all
Defined in:
lib/sql_search_parser.rb

Instance Attribute Summary collapse

Attributes inherited from Scalar

#left, #right

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ UnaryScalar

Returns a new instance of UnaryScalar.



90
91
92
93
# File 'lib/sql_search_parser.rb', line 90

def initialize options
  @value = options[:value]
  @operation = options[:operation]
end

Instance Attribute Details

#operationObject (readonly)

Returns the value of attribute operation.



89
90
91
# File 'lib/sql_search_parser.rb', line 89

def operation
  @operation
end

#valueObject (readonly)

Returns the value of attribute value.



89
90
91
# File 'lib/sql_search_parser.rb', line 89

def value
  @value
end

Instance Method Details

#to_sObject



95
96
97
# File 'lib/sql_search_parser.rb', line 95

def to_s
  "#{operation}#{value}"
end