module Rooftop::ResourceLinks
Constants
- CUSTOM_LINK_RELATION_BASE
Public Class Methods
included(base)
click to toggle source
# File lib/rooftop/resource_links/resource_links.rb, line 5 def self.included(base) # set up an attribute called resource_links, which is a collection of links # to other resources in the API. base.send(:after_find, :generate_resource_links) base.send(:after_save, :generate_resource_links) base.extend ClassMethods base.configure_resource_link_mapping end
Public Instance Methods
generate_resource_links()
click to toggle source
# File lib/rooftop/resource_links/resource_links.rb, line 14 def generate_resource_links if self.respond_to?(:"_links") self.resource_links = Rooftop::ResourceLinks::Collection.new(self._links, self.class) end end