Class: Glug::OSMKey

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

Overview

—– OSMKey

enables us to write "population<30000" and have it magically converted into a Condition

Instance Method Summary collapse

Constructor Details

#initialize(k) ⇒ OSMKey

Returns a new instance of OSMKey.



112
113
114
# File 'lib/glug.rb', line 112

def initialize(k)
  @k=k
end

Instance Method Details

#!=(*args) ⇒ Object



117
# File 'lib/glug.rb', line 117

def !=(*args); Condition.new.from_key(:!=,@k,args) end

#<(*args) ⇒ Object



118
# File 'lib/glug.rb', line 118

def  <(*args); Condition.new.from_key(:< ,@k,args) end

#<=(*args) ⇒ Object



120
# File 'lib/glug.rb', line 120

def <=(*args); Condition.new.from_key(:<=,@k,args) end

#==(*args) ⇒ Object



116
# File 'lib/glug.rb', line 116

def ==(*args); Condition.new.from_key(:==,@k,args) end

#>(*args) ⇒ Object



119
# File 'lib/glug.rb', line 119

def  >(*args); Condition.new.from_key(:> ,@k,args) end

#>=(*args) ⇒ Object



121
# File 'lib/glug.rb', line 121

def >=(*args); Condition.new.from_key(:>=,@k,args) end

#in(*args) ⇒ Object



122
# File 'lib/glug.rb', line 122

def in(*args); Condition.new.from_key(:in,@k,args) end

#is(*args) ⇒ Object



115
# File 'lib/glug.rb', line 115

def is(*args); Condition.new.from_key(:==,@k,args) end

#not_in(*args) ⇒ Object



123
# File 'lib/glug.rb', line 123

def not_in(*args); Condition.new.from_key('!in',@k,args) end