Class: Flaun::TargetConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ TargetConfig

Returns a new instance of TargetConfig.



19
20
21
22
23
# File 'lib/flaun/config.rb', line 19

def initialize(config)
  @config = config
  @forward_host_port = 80
  @user = ENV['USER']
end

Instance Attribute Details

#forward_host_portObject

Returns the value of attribute forward_host_port.



16
17
18
# File 'lib/flaun/config.rb', line 16

def forward_host_port
  @forward_host_port
end

#hostObject

Returns the value of attribute host.



16
17
18
# File 'lib/flaun/config.rb', line 16

def host
  @host
end

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/flaun/config.rb', line 16

def path
  @path
end

#userObject

Returns the value of attribute user.



17
18
19
# File 'lib/flaun/config.rb', line 17

def user
  @user
end

Instance Method Details

#access_urlObject



37
38
39
# File 'lib/flaun/config.rb', line 37

def access_url
  "http://localhost:#{@config.port}/#{path}"
end

#forward_hostObject



33
34
35
# File 'lib/flaun/config.rb', line 33

def forward_host
  'localhost'
end

#forward_portObject



29
30
31
# File 'lib/flaun/config.rb', line 29

def forward_port
  @config.port
end