Method: MediaTypes.get_organisation
- Defined in:
- lib/media_types.rb
.get_organisation(mod) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/media_types.rb', line 20 def self.get_organisation(mod) name = mod.name prefixes = @organisation_prefixes.keys.select { |p| name.start_with? p } return nil unless prefixes.any? best = prefixes.max_by { |p| p.length } @organisation_prefixes[best] end |