Class: Flight::Router::Map
Defined Under Namespace
Modules: Builder
Instance Method Summary collapse
- #env(**opts) ⇒ Object
-
#initialize(env:, input_dir:) ⇒ Map
constructor
A new instance of Map.
- #load_yaml(file) ⇒ Object
Methods inherited from MapBase
Constructor Details
Instance Method Details
#env(**opts) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/flight/router/map.rb', line 33 def env(**opts) if opts.empty? @env else unless opts.has_key?(@env) raise "env not defined: [#{@env}]" end opts[@env] end end |
#load_yaml(file) ⇒ Object
44 45 46 |
# File 'lib/flight/router/map.rb', line 44 def load_yaml(file) YAML.load_file File.join(@input_dir,file) end |