class AlgebraDB::Build::Between
A BETWEEN expression builder.
Constants
- VALID_TYPES
Public Class Methods
new(between_type, choose, start, finish)
click to toggle source
Calls superclass method
# File lib/algebra_db/build/between.rb, line 8 def initialize(between_type, choose, start, finish) super(between_type, choose, start, finish) return if VALID_TYPES.include?(between_type) raise ArgumentError, "#{between_type} must be one of #{VALID_TYPES.inspect}" end
Public Instance Methods
render_syntax(builder)
click to toggle source
# File lib/algebra_db/build/between.rb, line 16 def render_syntax(builder) choose.render_syntax(builder) builder.text(between_type.to_s.gsub('_', ' ').upcase) start.render_syntax(builder) builder.text('AND') finish.render_syntax(builder) end