Class: Odin::Transform::VerbExpr

Inherits:
FieldExpression show all
Defined in:
lib/odin/transform/transform_types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verb_name, arguments = [], custom: false) ⇒ VerbExpr

Returns a new instance of VerbExpr.



222
223
224
225
226
# File 'lib/odin/transform/transform_types.rb', line 222

def initialize(verb_name, arguments = [], custom: false)
  @verb_name = verb_name
  @arguments = arguments
  @custom = custom
end

Instance Attribute Details

#argumentsObject (readonly)

arguments: Array<FieldExpression>



219
220
221
# File 'lib/odin/transform/transform_types.rb', line 219

def arguments
  @arguments
end

#customObject (readonly)

boolean — true for %&customVerb



220
221
222
# File 'lib/odin/transform/transform_types.rb', line 220

def custom
  @custom
end

#verb_nameObject (readonly)

arguments: Array<FieldExpression>



219
220
221
# File 'lib/odin/transform/transform_types.rb', line 219

def verb_name
  @verb_name
end

Instance Method Details

#==(other) ⇒ Object



228
229
230
231
# File 'lib/odin/transform/transform_types.rb', line 228

def ==(other)
  other.is_a?(VerbExpr) && verb_name == other.verb_name &&
    arguments == other.arguments && custom == other.custom
end