Module: Balanced::HypermediaRegistry::ClassMethods
- Defined in:
- lib/balanced/resources/hypermedia.rb
Instance Attribute Summary collapse
-
#hypermedia_types ⇒ Array?
readonly
mapped to for interacting with the resource.
Instance Method Summary collapse
Instance Attribute Details
#hypermedia_types ⇒ Array? (readonly)
mapped to for interacting with the resource.
23 24 25 |
# File 'lib/balanced/resources/hypermedia.rb', line 23 def hypermedia_types @hypermedia_types end |
Instance Method Details
#define_hypermedia_types(types) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/balanced/resources/hypermedia.rb', line 11 def define_hypermedia_types(types) @hypermedia_types = types.map! do |t| t.to_s end.sort!.freeze @hypermedia_types.each do |type| Balanced.hypermedia_registry[type] = self end end |