Class: GatherContent::Api::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/gather_content/api/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#api_keyObject



18
19
20
# File 'lib/gather_content/api/config.rb', line 18

def api_key
  @api_key || ENV['GATHER_CONTENT_API_KEY']
end

#hostObject



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

#portObject



26
27
28
# File 'lib/gather_content/api/config.rb', line 26

def port
  @port || ENV['GATHER_CONTENT_API_PORT'] || "443"
end

#usernameObject



14
15
16
# File 'lib/gather_content/api/config.rb', line 14

def username
  @username || ENV['GATHER_CONTENT_API_USERNAME']
end

Class Method Details

.instanceObject



10
11
12
# File 'lib/gather_content/api/config.rb', line 10

def self.instance
  @instance ||= self.new
end

.run {|self.instance| ... } ⇒ Object

Yields:



6
7
8
# File 'lib/gather_content/api/config.rb', line 6

def self.run
  yield self.instance
end