Class: Core::Endpoint::BasicHandler::Associations::BelongsTo::Handler
- Inherits:
-
Object
- Object
- Core::Endpoint::BasicHandler::Associations::BelongsTo::Handler
- Includes:
- EndpointLookup
- Defined in:
- app/api/core/endpoint/basic_handler/associations/belongs_to.rb
Defined Under Namespace
Classes: Association
Instance Method Summary collapse
-
#initialize(name, options) ⇒ Handler
constructor
A new instance of Handler.
- #separate(associations, _) ⇒ Object
Constructor Details
#initialize(name, options) ⇒ Handler
Returns a new instance of Handler.
6 7 8 9 |
# File 'app/api/core/endpoint/basic_handler/associations/belongs_to.rb', line 6 def initialize(name, ) @name, @options = name, @throughs = Array([:through]) end |
Instance Method Details
#separate(associations, _) ⇒ Object
55 56 57 |
# File 'app/api/core/endpoint/basic_handler/associations/belongs_to.rb', line 55 def separate(associations, _) associations[@options[:json].to_s] = Association.new(method(:endpoint_details)) end |