Class: CloudSesame::Query::Domain::Literal

Inherits:
Object
  • Object
show all
Includes:
CloudSesame::Query::DSL::BindCaller, CloudSesame::Query::DSL::RangeHelper
Defined in:
lib/cloud_sesame/query/domain/literal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CloudSesame::Query::DSL::RangeHelper

#gt, #gte, #lt, #lte

Constructor Details

#initialize(_name, _options, _caller) ⇒ Literal

Returns a new instance of Literal.



10
11
12
13
14
15
16
# File 'lib/cloud_sesame/query/domain/literal.rb', line 10

def initialize(_name, _options, _caller)
	@_name = _name
	@_options = _options
	@_caller = _caller

	_bind_caller_instance_variables
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CloudSesame::Query::DSL::BindCaller

Instance Attribute Details

#_callerObject (readonly)

Returns the value of attribute _caller.



8
9
10
# File 'lib/cloud_sesame/query/domain/literal.rb', line 8

def _caller
  @_caller
end

#_nameObject (readonly)

Returns the value of attribute _name.



8
9
10
# File 'lib/cloud_sesame/query/domain/literal.rb', line 8

def _name
  @_name
end

#_optionsObject (readonly)

Returns the value of attribute _options.



8
9
10
# File 'lib/cloud_sesame/query/domain/literal.rb', line 8

def _options
  @_options
end

Instance Method Details

#_eval(&block) ⇒ Object



18
19
20
21
22
# File 'lib/cloud_sesame/query/domain/literal.rb', line 18

def _eval(&block)
	if block_given? && (_value = instance_exec(&block))
		AST::Literal.new _name, _value, _options
	end
end