Class: Tickethub::Token

Inherits:
Resource show all
Defined in:
lib/tickethub/token.rb

Instance Attribute Summary

Attributes inherited from Resource

#endpoint

Instance Method Summary collapse

Methods inherited from Resource

#==, #[], #[]=, all, association, attribute, attributes, call, collection, collection_method, collection_methods, descendants, #destroy, dump_value, #eql?, #errors, #hash, inherited, #initialize, #inspect, #load, load_value, path, polymorphic, register_type, registered_types, #reload!, #respond_to?, scope, scopes, serialize, singleton?, #to_h, #to_param, #to_s, #update, #valid?

Constructor Details

This class inherits a constructor from Tickethub::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tickethub::Resource

Instance Method Details

#can?(scope) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/tickethub/token.rb', line 5

def can?(scope)
  self.scope.member? scope.to_s
end