Class: UnaryQ
Direct Known Subclasses
Instance Attribute Summary collapse
-
#op1 ⇒ Object
Returns the value of attribute op1.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(*args) ⇒ UnaryQ
constructor
A new instance of UnaryQ.
- #to_q_sql(klass) ⇒ Object
Methods inherited from Q
Constructor Details
#initialize(*args) ⇒ UnaryQ
Returns a new instance of UnaryQ.
60 61 62 |
# File 'lib/dolzenko/django_q_object.rb', line 60 def initialize(*args) self.op1 = (args.size == 1 ? args[0] : args) end |
Instance Attribute Details
#op1 ⇒ Object
Returns the value of attribute op1.
58 59 60 |
# File 'lib/dolzenko/django_q_object.rb', line 58 def op1 @op1 end |
Instance Method Details
#empty? ⇒ Boolean
68 69 70 |
# File 'lib/dolzenko/django_q_object.rb', line 68 def empty? op1.empty? end |
#to_q_sql(klass) ⇒ Object
64 65 66 |
# File 'lib/dolzenko/django_q_object.rb', line 64 def to_q_sql(klass) klass.send(:sanitize_sql, op1) end |