Class: Toktokkie::Configuration
- Inherits:
-
Object
- Object
- Toktokkie::Configuration
- Defined in:
- lib/toktokkie/configuration.rb
Constant Summary collapse
- DEFAULT_URL =
"https://www.toktokkie.io"
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #usable? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/toktokkie/configuration.rb', line 7 def initialize self.url = DEFAULT_URL if blank?(url) end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/toktokkie/configuration.rb', line 5 def key @key end |
#secret ⇒ Object
Returns the value of attribute secret.
5 6 7 |
# File 'lib/toktokkie/configuration.rb', line 5 def secret @secret end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/toktokkie/configuration.rb', line 5 def url @url end |
Instance Method Details
#usable? ⇒ Boolean
11 12 13 14 15 |
# File 'lib/toktokkie/configuration.rb', line 11 def usable? %i[key secret url].none? do |setting| blank?(send(setting)) end end |