Class: Flight::Router::MapBase
- Inherits:
-
Object
- Object
- Flight::Router::MapBase
- Defined in:
- lib/flight/router/map_base.rb
Instance Method Summary collapse
Instance Method Details
#config ⇒ Object
8 9 10 |
# File 'lib/flight/router/map_base.rb', line 8 def config @config ||= {} end |
#group(path, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/flight/router/map_base.rb', line 12 def group(path,&block) @path ||= [] @path << path @_config = config @config = {} instance_exec(&block) @config = @_config.deep_merge( path => @config, ) @_config = nil @path.pop end |
#map ⇒ Object
5 6 7 |
# File 'lib/flight/router/map_base.rb', line 5 def map @_config || config end |
#set(key, *args, **opts) ⇒ Object
28 29 30 |
# File 'lib/flight/router/map_base.rb', line 28 def set(key,*args,**opts) config[key] = value(key,args,opts) end |