Class: Perpetuity::Postgres::QueryAttribute
- Inherits:
-
Object
- Object
- Perpetuity::Postgres::QueryAttribute
- Defined in:
- lib/perpetuity/postgres/query_attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #in(collection) ⇒ Object
-
#initialize(name) ⇒ QueryAttribute
constructor
A new instance of QueryAttribute.
- #nil? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ QueryAttribute
Returns a new instance of QueryAttribute.
8 9 10 |
# File 'lib/perpetuity/postgres/query_attribute.rb', line 8 def initialize name @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/perpetuity/postgres/query_attribute.rb', line 6 def name @name end |
Instance Method Details
#in(collection) ⇒ Object
20 21 22 |
# File 'lib/perpetuity/postgres/query_attribute.rb', line 20 def in collection QueryExpression.new self, :in, collection end |
#nil? ⇒ Boolean
24 25 26 |
# File 'lib/perpetuity/postgres/query_attribute.rb', line 24 def nil? QueryExpression.new self, :==, nil end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/perpetuity/postgres/query_attribute.rb', line 28 def to_s name.to_s end |