def links(rel = nil)
      @links ||= parse_links(@_json)

      return nil if @links.empty? && !rel.nil?
      return @links if @links.empty? || rel.nil?

      @links.detect { |ep| ep.rel == rel }
    end
def links(rel = nil)
      @links ||= parse_links(@_json)

      return nil if @links.empty? && !rel.nil?
      return @links if @links.empty? || rel.nil?

      @links.detect { |ep| ep.rel == rel }
    end
Public: Initialize a Resource.

 json - Hash that represents parsed JSON.

 Raises ArgumentError if json parameter is not a Hash object.
 Public: Read links from Resource. Links are optional.
 See Resource root doc for details.

 rel - Optional String parameter. Filter links by rel attribute.

 Returns Empty Array or Array of EntryPoints, if "rel" is informed
 it returns nil or an instance of EntryPoint.