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.
57 58 59 |
# File 'lib/dolzenko/django_q_object.rb', line 57 def initialize(*args) self.op1 = (args.size == 1 ? args[0] : args) end |
Instance Attribute Details
#op1 ⇒ Object
Returns the value of attribute op1.
55 56 57 |
# File 'lib/dolzenko/django_q_object.rb', line 55 def op1 @op1 end |
Instance Method Details
#empty? ⇒ Boolean
65 66 67 |
# File 'lib/dolzenko/django_q_object.rb', line 65 def empty? op1.empty? end |
#to_q_sql(klass) ⇒ Object
61 62 63 |
# File 'lib/dolzenko/django_q_object.rb', line 61 def to_q_sql(klass) klass.send(:sanitize_sql, op1) end |