Class: Glug::Subscriptable

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

Overview

—– Subscriptable

allows us to create conditions with syntax
  any[(highway=='primary'),(highway=='trunk')]

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Subscriptable

Returns a new instance of Subscriptable.



11
12
13
# File 'lib/glug.rb', line 11

def initialize(type)
	@type=type
end

Instance Method Details

#[](*arguments) ⇒ Object



14
15
16
# File 'lib/glug.rb', line 14

def [](*arguments)
	Condition.new.from_list(@type, arguments)
end