Class: Panda::Subject

Inherits:
Node
  • Object
show all
Defined in:
lib/panda/expressions.rb

Overview

The comparison subject node class.

Subject nodes represent the ‘subject’ (left operand) of a Comparison object. Subjects are nothing more than thin wrappers around any object that represents the name of a comparison subject (typically a Symbol or String) that have Comparison operator builder methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

define_operator_builders_for

Constructor Details

#initialize(name) ⇒ Subject

Returns a new instance of Subject.



200
201
202
# File 'lib/panda/expressions.rb', line 200

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



197
198
199
# File 'lib/panda/expressions.rb', line 197

def name
  @name
end