Module: Transcriber::Resource::Relation::Response
- Included in:
- Transcriber::Resource::Relation
- Defined in:
- lib/transcriber/resource/key/relation/response.rb
Instance Method Summary collapse
Instance Method Details
#to_relation(parent) ⇒ Object
11 12 13 |
# File 'lib/transcriber/resource/key/relation/response.rb', line 11 def to_relation(parent) {rel: name, href: href(parent)} end |
#to_resource(parent) ⇒ Object
5 6 7 8 9 |
# File 'lib/transcriber/resource/key/relation/response.rb', line 5 def to_resource(parent) included = parent.__send__(name) return {} unless visible?(parent) and included {name => resource_from_included(included)} end |