Class: Core::Endpoint::BasicHandler::Actions::Factory::Nested
- Inherits:
- 
      Core::Endpoint::BasicHandler
      
        - Object
- Core::Endpoint::BasicHandler
- Core::Endpoint::BasicHandler::Actions::Factory::Nested
 
- Defined in:
- app/api/core/endpoint/basic_handler/actions/factory.rb
Instance Method Summary collapse
- #core_path ⇒ Object
- 
  
    
      #initialize(name)  ⇒ Nested 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Nested. 
- #separate(associations, _) ⇒ Object
Constructor Details
#initialize(name) ⇒ Nested
Returns a new instance of Nested.
| 4 5 6 7 | # File 'app/api/core/endpoint/basic_handler/actions/factory.rb', line 4 def initialize(name, &) super(&) @name = name.to_s end | 
Instance Method Details
#core_path ⇒ Object
| 19 20 21 | # File 'app/api/core/endpoint/basic_handler/actions/factory.rb', line 19 def core_path(*) super(@name, *) end | 
#separate(associations, _) ⇒ Object
| 9 10 11 12 13 14 15 16 17 | # File 'app/api/core/endpoint/basic_handler/actions/factory.rb', line 9 def separate(associations, _) associations[@name] = lambda do |object, , stream| stream.block(@name) do |nested_stream| nested_stream.block('actions') do |action_stream| actions(object, .merge(target: object)).map { |action, url| action_stream.attribute(action, url) } end end end end |