Class: GatherContent::Api::Config
- Inherits:
-
Object
- Object
- GatherContent::Api::Config
- Defined in:
- lib/gather_content/api/config.rb
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
18 19 20 |
# File 'lib/gather_content/api/config.rb', line 18 def api_key @api_key || ENV['GATHER_CONTENT_API_KEY'] end |
#host ⇒ Object
22 23 24 |
# File 'lib/gather_content/api/config.rb', line 22 def host @host || ENV['GATHER_CONTENT_API_HOST'] || "https://api.gathercontent.com" end |
#port ⇒ Object
26 27 28 |
# File 'lib/gather_content/api/config.rb', line 26 def port @port || ENV['GATHER_CONTENT_API_PORT'] || "443" end |
#username ⇒ Object
14 15 16 |
# File 'lib/gather_content/api/config.rb', line 14 def username @username || ENV['GATHER_CONTENT_API_USERNAME'] end |
Class Method Details
.instance ⇒ Object
10 11 12 |
# File 'lib/gather_content/api/config.rb', line 10 def self.instance @instance ||= self.new end |
.run {|self.instance| ... } ⇒ Object
6 7 8 |
# File 'lib/gather_content/api/config.rb', line 6 def self.run yield self.instance end |