Class: Arel::Nodes::TSVector
- Inherits:
-
Node
- Object
- Node
- Arel::Nodes::TSVector
- Defined in:
- lib/arel/nodes/ts_vector.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(attribute, language: nil) ⇒ TSVector
constructor
A new instance of TSVector.
Constructor Details
#initialize(attribute, language: nil) ⇒ TSVector
Returns a new instance of TSVector.
9 10 11 12 |
# File 'lib/arel/nodes/ts_vector.rb', line 9 def initialize(attribute, language: nil) @attribute = attribute @language = Arel::Nodes.build_quoted(language) if language end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
7 8 9 |
# File 'lib/arel/nodes/ts_vector.rb', line 7 def attribute @attribute end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
7 8 9 |
# File 'lib/arel/nodes/ts_vector.rb', line 7 def language @language end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
18 19 20 21 22 |
# File 'lib/arel/nodes/ts_vector.rb', line 18 def eql? other self.class == other.class && self.attribute == other.attribute && self.language == other.language end |
#hash ⇒ Object
14 15 16 |
# File 'lib/arel/nodes/ts_vector.rb', line 14 def hash [@attribute, @language].hash end |