class MongoQL::Expression::MethodCall
Attributes
args[RW]
ast_template[RW]
method[RW]
target[RW]
Public Class Methods
new(method, target, ast_template: nil, **args)
click to toggle source
# File lib/mongo_ql/expression/method_call.rb, line 7 def initialize(method, target, ast_template: nil, **args) @method = method @args = args @target = to_expression(target) @ast_template = ast_template end
Public Instance Methods
to_ast()
click to toggle source
# File lib/mongo_ql/expression/method_call.rb, line 14 def to_ast if ast_template { method => ast_template.call(target, **args) } else { method => target } end end