Class: Fugle::Config Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, &block) ⇒ Config

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create new config instance

Parameters:

  • attributes (Hash) (defaults to: {})

    the default config

  • block (Proc)

    the config block

Since:

  • 0.1.0



16
17
18
19
20
21
22
# File 'lib/fugle/config.rb', line 16

def initialize(attributes = {}, &block)
  attributes.each do |name, value|
    send("#{name}=", value)
  end

  instance_exec(self, &block) if block_given?
end

Instance Attribute Details

#api_tokenString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The API Token

Returns:

  • (String)

    the api token

Since:

  • 0.1.0



29
30
31
# File 'lib/fugle/config.rb', line 29

def api_token
  @api_token || ENV['FUGLE_API_TOKEN']
end