Class: JSONAPI::Consumer::Linking::Links

Inherits:
Object
  • Object
show all
Includes:
Helpers::DynamicAttributes
Defined in:
lib/jsonapi/consumer/linking/links.rb

Instance Method Summary collapse

Methods included from Helpers::DynamicAttributes

#[], #[]=, #attributes, #attributes=, #has_attribute?, #respond_to_missing?

Constructor Details

#initialize(links) ⇒ Links

Returns a new instance of Links.



6
7
8
# File 'lib/jsonapi/consumer/linking/links.rb', line 6

def initialize(links)
  self.attributes = links
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class JSONAPI::Consumer::Helpers::DynamicAttributes

Instance Method Details

#present?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/jsonapi/consumer/linking/links.rb', line 10

def present?
  attributes.present?
end