Class: Polyamorous::Join
- Inherits:
-
Object
- Object
- Polyamorous::Join
- Includes:
- TreeNode
- Defined in:
- lib/polyamorous/join.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #add_to_tree(hash) ⇒ Object
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(name, type = InnerJoin, klass = nil) ⇒ Join
constructor
A new instance of Join.
Constructor Details
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
6 7 8 |
# File 'lib/polyamorous/join.rb', line 6 def klass @klass end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/polyamorous/join.rb', line 5 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/polyamorous/join.rb', line 6 def type @type end |
Instance Method Details
#add_to_tree(hash) ⇒ Object
35 36 37 |
# File 'lib/polyamorous/join.rb', line 35 def add_to_tree(hash) hash[self] ||= {} end |
#eql?(other) ⇒ Boolean Also known as: ==
26 27 28 29 30 31 |
# File 'lib/polyamorous/join.rb', line 26 def eql?(other) self.class == other.class && self.name == other.name && self.type == other.type && self.klass == other.klass end |
#hash ⇒ Object
22 23 24 |
# File 'lib/polyamorous/join.rb', line 22 def hash [@name, @type, @klass].hash end |