Module: Fred

Defined in:
lib/fred.rb,
lib/fred/client.rb

Defined Under Namespace

Classes: Client

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



34
35
36
# File 'lib/fred.rb', line 34

def api_key
  @api_key
end

Class Method Details

.configure {|_self| ... } ⇒ Object

create config/initializers/fred.rb

Fred.configure do |config|

config.api_key = 'api_key'

end client = Fred::Client.new

or

Fred.api_key = ‘api_key’

or

Fred::Client.new(:api_key => ‘api_key’)

Yields:

  • (_self)

Yield Parameters:

  • _self (Fred)

    the object that the method was called on



28
29
30
31
# File 'lib/fred.rb', line 28

def self.configure
  yield self
  true
end