Class: MdlSql::Where

Inherits:
Object
  • Object
show all
Defined in:
lib/mdlsql/where.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#col1Object (readonly)



24
# File 'lib/mdlsql/where.rb', line 24

attr_accessor :cond1, :cond2, :op, :concat

#col2Object (readonly)



24
# File 'lib/mdlsql/where.rb', line 24

attr_accessor :cond1, :cond2, :op, :concat

#concatObject

Returns the value of attribute concat.



24
25
26
# File 'lib/mdlsql/where.rb', line 24

def concat
  @concat
end

#cond1Object

Returns the value of attribute cond1.



24
25
26
# File 'lib/mdlsql/where.rb', line 24

def cond1
  @cond1
end

#cond2Object

Returns the value of attribute cond2.



24
25
26
# File 'lib/mdlsql/where.rb', line 24

def cond2
  @cond2
end

#opObject

Returns the value of attribute op.



24
25
26
# File 'lib/mdlsql/where.rb', line 24

def op
  @op
end