Class: RubyVibe

Inherits:
Object
  • Object
show all
Includes:
Calls
Defined in:
lib/ruby_vibe.rb,
lib/ruby_vibe/urls.rb,
lib/ruby_vibe/calls.rb,
lib/ruby_vibe/client.rb,
lib/ruby_vibe/version.rb,
lib/ruby_vibe/calls/info.rb,
lib/ruby_vibe/configuration.rb,
lib/ruby_vibe/calls/messaging.rb

Defined Under Namespace

Modules: Calls, URLS Classes: Client, Configuration

Constant Summary collapse

VERSION =
'0.0.2'.freeze

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Calls::Messaging

#broadcast_message, #send_message

Methods included from Calls::Info

#get_account_data, #get_online, #get_user_details, #set_webhook

Constructor Details

#initialize(auth_token: nil) ⇒ RubyVibe

Returns a new instance of RubyVibe.



13
14
15
# File 'lib/ruby_vibe.rb', line 13

def initialize(auth_token: nil)
  @client = Client.new(auth_token: auth_token)
end

Class Attribute Details

.configObject

Accessor for global configuration.



4
5
6
# File 'lib/ruby_vibe/configuration.rb', line 4

def config
  @config
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



9
10
11
# File 'lib/ruby_vibe.rb', line 9

def client
  @client
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:



7
8
9
10
# File 'lib/ruby_vibe/configuration.rb', line 7

def self.configure
  self.config ||= Configuration.new
  yield(config) if block_given?
end