Class: Truemail::Client::Configuration
- Inherits:
-
Object
- Object
- Truemail::Client::Configuration
- Defined in:
- lib/truemail/client/configuration.rb
Constant Summary collapse
- DEFAULT_PORT =
9292
- Error =
::Class.new(::StandardError)
- ArgumentError =
::Class.new(::StandardError) do def initialize(arg_value, arg_name) super("#{arg_value} is not a valid #{arg_name[0..-2]}") end end
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#secure_connection ⇒ Object
Returns the value of attribute secure_connection.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #complete? ⇒ Boolean
-
#initialize(&block) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(&block) ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 |
# File 'lib/truemail/client/configuration.rb', line 18 def initialize(&block) @secure_connection = false @port = Truemail::Client::Configuration::DEFAULT_PORT tap(&block) if block end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
15 16 17 |
# File 'lib/truemail/client/configuration.rb', line 15 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
15 16 17 |
# File 'lib/truemail/client/configuration.rb', line 15 def port @port end |
#secure_connection ⇒ Object
Returns the value of attribute secure_connection.
16 17 18 |
# File 'lib/truemail/client/configuration.rb', line 16 def secure_connection @secure_connection end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
15 16 17 |
# File 'lib/truemail/client/configuration.rb', line 15 def token @token end |
Instance Method Details
#complete? ⇒ Boolean
35 36 37 |
# File 'lib/truemail/client/configuration.rb', line 35 def complete? !!host && !!token end |