Class: Glug::Subscriptable
- Inherits:
-
Object
- Object
- Glug::Subscriptable
- Defined in:
- lib/glug/condition.rb
Overview
—– Subscriptable
allows us to create conditions with syntax
any[(highway=='primary'),(highway=='trunk')]
Instance Method Summary collapse
- #[](*arguments) ⇒ Object
-
#initialize(type) ⇒ Subscriptable
constructor
A new instance of Subscriptable.
Constructor Details
#initialize(type) ⇒ Subscriptable
8 9 10 |
# File 'lib/glug/condition.rb', line 8 def initialize(type) @type=type end |
Instance Method Details
#[](*arguments) ⇒ Object
11 12 13 |
# File 'lib/glug/condition.rb', line 11 def [](*arguments) Condition.new.from_list(@type, arguments) end |