Module: TwilioResource

Defined in:
lib/twilio_resource.rb,
lib/twilio_resource/exceptions.rb

Defined Under Namespace

Classes: Account, Base, Call, Exception, IncomingPhoneNumber, LocalIncomingPhoneNumber, NoPhoneNumbersFoundException, TollFreeIncomingPhoneNumber

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/twilio_resource.rb', line 10

def logger
  @logger
end

Class Method Details

.setup(sid, token, logger = nil) ⇒ Object

Sets up the credentials the ActiveResources will use to access the twilio API. Optionally takes a logger, which defaults to STDOUT.



15
16
17
18
19
# File 'lib/twilio_resource.rb', line 15

def self.setup(sid, token, logger = nil)
  @logger = logger || Logger.new(STDOUT) 
  TwilioResource::Base.sid = sid
  TwilioResource::Base.token = token
end