Module: Freelancer::API

Included in:
Client
Defined in:
lib/freelancer.rb,
lib/freelancer/api.rb,
lib/freelancer/api/job.rb,
lib/freelancer/api/user.rb,
lib/freelancer/api/common.rb,
lib/freelancer/api/message.rb,
lib/freelancer/api/payment.rb,
lib/freelancer/api/profile.rb,
lib/freelancer/api/project.rb,
lib/freelancer/api/employer.rb,
lib/freelancer/api/freelancer.rb,
lib/freelancer/api/notification.rb

Defined Under Namespace

Modules: Common, Employer, Freelancer, Job, Message, Notification, Payment, Profile, Project, User

Instance Method Summary collapse

Instance Method Details

#api(api) ⇒ Object

Include the specified API



10
11
12
13
14
15
16
17
# File 'lib/freelancer/api.rb', line 10

def api(api)
  
  extend api::ClassMethods if api.const_defined?(:ClassMethods)
  include api::InstanceMethods if api.const_defined?(:InstanceMethods)
  
  apis << api
  
end

#apisObject

Returns the list of registered APIs



5
6
7
# File 'lib/freelancer/api.rb', line 5

def apis
  @apis ||= []
end