Class: Forwards

Inherits:
Object
  • Object
show all
Defined in:
lib/forwards.rb

Instance Method Summary collapse

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

#forwardsObject



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