Module: JSONAPIonify::Structure::Helpers::InheritsOrigin
- Included in:
- Collections::Base, Objects::Base
- Defined in:
- lib/jsonapionify/structure/helpers/inherits_origin.rb
Instance Method Summary collapse
Instance Method Details
#client? ⇒ Boolean
4 5 6 |
# File 'lib/jsonapionify/structure/helpers/inherits_origin.rb', line 4 def client? origin == :client end |
#origin ⇒ Object
12 13 14 |
# File 'lib/jsonapionify/structure/helpers/inherits_origin.rb', line 12 def origin self.parent.try(:origin) end |
#server? ⇒ Boolean
8 9 10 |
# File 'lib/jsonapionify/structure/helpers/inherits_origin.rb', line 8 def server? origin == :server end |