Module: Core::Io::Json::Grammar::Resource
- Defined in:
- app/api/core/io/json/grammar.rb
Instance Method Summary collapse
Instance Method Details
#resource_details(endpoint, object, options, stream) ⇒ Object
184 185 186 187 188 189 190 191 192 |
# File 'app/api/core/io/json/grammar.rb', line 184 def resource_details(endpoint, object, , stream) stream.block('actions') do |nested_stream| endpoint .send(:actions, object, .merge(target: object)) .map { |action, url| nested_stream.attribute(action, url) } actions(object, , nested_stream) end stream.attribute('uuid', object.uuid) end |