Class: Katapaty::Configuration
- Inherits:
-
Object
- Object
- Katapaty::Configuration
- Defined in:
- lib/katapaty/configuration.rb
Constant Summary collapse
- DEFAULT_TIMEOUT_IN_SECONDS =
120
Instance Attribute Summary collapse
-
#block_host ⇒ Object
Returns the value of attribute block_host.
-
#block_password ⇒ Object
Returns the value of attribute block_password.
-
#block_port ⇒ Object
Returns the value of attribute block_port.
-
#block_username ⇒ Object
Returns the value of attribute block_username.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#ssl ⇒ Object
Returns the value of attribute ssl.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#block_host ⇒ Object
Returns the value of attribute block_host.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def block_host @block_host end |
#block_password ⇒ Object
Returns the value of attribute block_password.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def block_password @block_password end |
#block_port ⇒ Object
Returns the value of attribute block_port.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def block_port @block_port end |
#block_username ⇒ Object
Returns the value of attribute block_username.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def block_username @block_username end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def port @port end |
#ssl ⇒ Object
Returns the value of attribute ssl.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def ssl @ssl end |
#timeout ⇒ Object
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/katapaty/configuration.rb', line 3 def username @username end |
Instance Method Details
#counterblock_url ⇒ Object
21 22 23 24 25 26 |
# File 'lib/katapaty/configuration.rb', line 21 def counterblock_url return 'http://rpc:[email protected]:14100/api/' unless @block_host authen = '' authen = "#{@block_username}:#{CGI.escape(@block_password)}@" if @block_username "#{protocol}://#{authen}#{@block_host}:#{@block_port}/api/" end |
#counterparty_url ⇒ Object
16 17 18 19 |
# File 'lib/katapaty/configuration.rb', line 16 def counterparty_url return 'http://rpc:[email protected]:14000/api/' unless @host "#{protocol}://#{@username}:#{CGI.escape(@password)}@#{@host}:#{@port}/api/" end |