Method: Balanced::HypermediaRegistry::ClassMethods#define_hypermedia_types

Defined in:
lib/balanced/resources/hypermedia.rb

#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