module Dirble::Configurable

Attributes

api_key[RW]
connection[RW]

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/dirble/configurable.rb, line 5
def configure
  yield self
  prepare_connection
  self
end
prepare_connection() click to toggle source
# File lib/dirble/configurable.rb, line 11
def prepare_connection
  raise ArgumentError, 'You have to set api key in configure' unless self.api_key
  self.connection = Dirble::Connection.new
end
reset!() click to toggle source
# File lib/dirble/configurable.rb, line 16
def reset!
  self.api_key = nil
end