Class: Flaun::TargetConfig
- Inherits:
-
Object
- Object
- Flaun::TargetConfig
- Defined in:
- lib/flaun/config.rb
Instance Attribute Summary collapse
-
#forward_host_port ⇒ Object
Returns the value of attribute forward_host_port.
-
#host ⇒ Object
Returns the value of attribute host.
-
#path ⇒ Object
Returns the value of attribute path.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #access_url ⇒ Object
- #forward_host ⇒ Object
- #forward_port ⇒ Object
-
#initialize(config) ⇒ TargetConfig
constructor
A new instance of TargetConfig.
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_port ⇒ Object
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 |
#host ⇒ Object
Returns the value of attribute host.
16 17 18 |
# File 'lib/flaun/config.rb', line 16 def host @host end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/flaun/config.rb', line 16 def path @path end |
#user ⇒ Object
Returns the value of attribute user.
17 18 19 |
# File 'lib/flaun/config.rb', line 17 def user @user end |
Instance Method Details
#access_url ⇒ Object
37 38 39 |
# File 'lib/flaun/config.rb', line 37 def access_url "http://localhost:#{@config.port}/#{path}" end |
#forward_host ⇒ Object
33 34 35 |
# File 'lib/flaun/config.rb', line 33 def forward_host 'localhost' end |
#forward_port ⇒ Object
29 30 31 |
# File 'lib/flaun/config.rb', line 29 def forward_port @config.port end |