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.
4 5 6 7 |
# File 'lib/forwards.rb', line 4 def initialize(config, args = []) @config = config @args = args end |
Instance Method Details
#forwards ⇒ Object
13 14 15 |
# File 'lib/forwards.rb', line 13 def forwards @forwards ||= @config["forwards"] || {} end |
#get(name) ⇒ Object
9 10 11 |
# File 'lib/forwards.rb', line 9 def get(name) Forward.new(forwards[name], @args) if forwards[name] end |