Class: Forwards
- Inherits:
-
Object
- Object
- Forwards
- Defined in:
- lib/forwards.rb
Instance Method Summary collapse
- #forwards ⇒ Object
- #get(name) ⇒ Object
-
#initialize(config, args = []) ⇒ Forwards
constructor
A new instance of Forwards.
Constructor Details
#initialize(config, args = []) ⇒ Forwards
Returns a new instance of Forwards.
6 7 8 9 |
# File 'lib/forwards.rb', line 6 def initialize(config, args = []) @config = config @args = args end |
Instance Method Details
#forwards ⇒ Object
15 16 17 |
# File 'lib/forwards.rb', line 15 def forwards @forwards ||= @config["forwards"] || {} end |
#get(name) ⇒ Object
11 12 13 |
# File 'lib/forwards.rb', line 11 def get(name) Forward.new(forwards[name], @args) if forwards[name] end |