Method: Rusql::Join#initialize
- Defined in:
- lib/rusql/join.rb
#initialize(type, table, condition) ⇒ Join
Returns a new instance of Join.
13 14 15 16 17 18 19 20 21 |
# File 'lib/rusql/join.rb', line 13 def initialize(type, table, condition) raise Exception.new("Expected type to be one of #{ TYPES.map(&:to_s).join(",") }") unless TYPES.include?(type) raise TypeException.new(Table, table.class) unless table.is_a?(Table) raise TypeException.new(BasicCondition, condition.class) unless condition.is_a?(BasicCondition) @type = type @table = table @condition = condition end |