Class: MdlSql::Where
- Inherits:
-
Object
- Object
- MdlSql::Where
- Defined in:
- lib/mdlsql/where.rb
Instance Attribute Summary collapse
- #col1 ⇒ Object readonly
- #col2 ⇒ Object readonly
-
#concat ⇒ Object
Returns the value of attribute concat.
-
#cond1 ⇒ Object
Returns the value of attribute cond1.
-
#cond2 ⇒ Object
Returns the value of attribute cond2.
-
#op ⇒ Object
Returns the value of attribute op.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Where
constructor
A new instance of Where.
Constructor Details
#initialize(opts = {}) ⇒ Where
Returns a new instance of Where.
26 27 28 29 30 31 32 33 34 |
# File 'lib/mdlsql/where.rb', line 26 def initialize opts={} @cond1 = opts[:cond1] @cond2 = opts[:cond2] opts[:op].to_sym if opts[:op].is_a? String opts[:concat].to_sym if opts[:concat].is_a? String @op = opts[:op] @concat = opts[:concat] end |
Instance Attribute Details
#col1 ⇒ Object (readonly)
24 |
# File 'lib/mdlsql/where.rb', line 24 attr_accessor :cond1, :cond2, :op, :concat |
#col2 ⇒ Object (readonly)
24 |
# File 'lib/mdlsql/where.rb', line 24 attr_accessor :cond1, :cond2, :op, :concat |
#concat ⇒ Object
Returns the value of attribute concat.
24 25 26 |
# File 'lib/mdlsql/where.rb', line 24 def concat @concat end |
#cond1 ⇒ Object
Returns the value of attribute cond1.
24 25 26 |
# File 'lib/mdlsql/where.rb', line 24 def cond1 @cond1 end |
#cond2 ⇒ Object
Returns the value of attribute cond2.
24 25 26 |
# File 'lib/mdlsql/where.rb', line 24 def cond2 @cond2 end |
#op ⇒ Object
Returns the value of attribute op.
24 25 26 |
# File 'lib/mdlsql/where.rb', line 24 def op @op end |