module Roar::JSON::HAL::LinksReader
This is only helpful in client mode. It shouldn't be used per default.
Public Instance Methods
links()
click to toggle source
# File lib/roar/json/hal.rb, line 196 def links return unless @links tuples = @links.collect do |link| if link.is_a?(Array) next unless link.any? [link.first.rel, link] else [link.rel, link] end end.compact # tuples.to_h ::Hash[tuples] # TODO: tuples.to_h when dropping < 2.1. end