Class: Roar::Representer::JSON::HAL::LinkCollection
- Inherits:
-
Feature::Hypermedia::LinkCollection
- Object
- Hash
- Feature::Hypermedia::LinkCollection
- Roar::Representer::JSON::HAL::LinkCollection
- Defined in:
- lib/roar/representer/json/hal.rb
Instance Method Summary collapse
-
#initialize(array_rels, *args) ⇒ LinkCollection
constructor
A new instance of LinkCollection.
- #is_array?(rel) ⇒ Boolean
Methods inherited from Feature::Hypermedia::LinkCollection
Constructor Details
#initialize(array_rels, *args) ⇒ LinkCollection
Returns a new instance of LinkCollection.
82 83 84 85 |
# File 'lib/roar/representer/json/hal.rb', line 82 def initialize(array_rels, *args) super(*args) @array_rels = array_rels.map(&:to_s) end |
Instance Method Details
#is_array?(rel) ⇒ Boolean
87 88 89 |
# File 'lib/roar/representer/json/hal.rb', line 87 def is_array?(rel) @array_rels.include?(rel.to_s) end |