lib/hal_client/links_section.rb
# Returns the URLs or URL templates of each link with the
# specified rel in this section.
#
# link_rel - The fully qualified link relation
# default_proc - (optional) A proc to execute to create a
#   default value if the specified link_rel does not exist
#
# Yields the link_rel to the default_proc if the specified
# link_rel is not present and returns the return value of the
# default_proc.
#
# Raises KeyError if the specified link_rel is not present and no
# default_value or default_proc are provided.
Returns the URLs or URL templates of each link with the
specified rel in this section.

The fully qualified link relation
default_proc - (optional) A proc to execute to create a
default value if the specified link_rel does not exist

Yields the link_rel to the default_proc if the specified
link_rel is not present and returns the return value of the
default_proc.

Raises KeyError if the specified link_rel is not present and no
default_value or default_proc are provided.
Returns the URLs or URL templates of each link with the specified rel in this section . The fully qualified link relation default_proc - ( optional ) A proc to execute to create a default value if the specified link_rel does not exist Yields the link_rel to the default_proc if the specified link_rel is not present and returns the return value of the default_proc . Raises KeyError if the specified link_rel is not present and no default_value or default_proc are provided .
def hrefs(link_rel, &default_proc)
      default_proc ||= NO_RELATED_RESOURCE
      return default_proc.call(link_rel) unless section.key? link_rel
      [section.fetch(link_rel)]
        .flatten
        .map{|link| resolve_to_url(link)}
    end
def hrefs ( link_rel , & default_proc ) default_proc ||= NO_RELATED_RESOURCE return default_proc . call ( link_rel ) unless section . key? link_rel [ section . fetch ( link_rel ) ] . flatten . map { | link | resolve_to_url ( link ) } end
Returns the URLs or URL templates of each link with the
specified rel in this section.
Returns the URLs or URL templates of each link with the specified rel in this section .
link_rel
<not_specific>
default_proc
<not_specific>