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.



6
7
8
9
# File 'lib/forwards.rb', line 6

def initialize(config, args = [])
	@config = config
	@args = args
end

Instance Method Details

#forwardsObject



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