Class: Tickethub::App
Direct Known Subclasses
Defined Under Namespace
Classes: Category, Subscription
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(endpoint, attributes = nil) ⇒ App
constructor
A new instance of App.
Methods inherited from Resource
#==, #[], #[]=, all, association, attribute, attributes, collection, descendants, #destroy, dump_value, endpoint, #eql?, #errors, #hash, inherited, #inspect, load, #load, load_value, path, polymorphic, register_type, registered_types, #reload!, #respond_to?, scope, scopes, serialize, #to_h, #to_param, #to_s, #update, #valid?
Constructor Details
#initialize(endpoint, attributes = nil) ⇒ App
Returns a new instance of App.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/tickethub/app.rb', line 23 def initialize(endpoint, attributes = nil) attributes ||= endpoint.get if attributes['token'] endpoint = Tickethub.endpoint['/app', { auth_type: :bearer, password: attributes['token']['access_token'] }] end super(endpoint, attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Tickethub::Resource