class Driver::Client
Attributes
api[R]
Public Class Methods
const_missing(name)
click to toggle source
# File lib/driver/client.rb, line 4 def const_missing(name) name end
drive(*modules)
click to toggle source
# File lib/driver/client.rb, line 8 def drive(*modules) # api autoload :API, "#{self}/api".underscore modules.each_with_index do |m, i| # client autoload m, "#{self}::#{m}".underscore modules[i] = "#{self}::#{m}".constantize end include *modules end
model(*modules)
click to toggle source
# File lib/driver/client.rb, line 22 def model(*modules) modules.each_with_index do |m, i| # model module_name = self.to_s.sub("::#{self.to_s.demodulize}", '').constantize module_name.autoload m, "#{self}::Model::#{m}".underscore end Driver::Model.concerns end
new(api)
click to toggle source
# File lib/driver/client.rb, line 35 def initialize(api) @api = api end