Method: Olib::Item.type_methods
- Defined in:
- lib/Olib/core/item.rb
.type_methods ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/Olib/core/item.rb', line 54 def self.type_methods TYPES.map { |type| if type.class == Array then [ Olib.methodize(type.first).to_sym, type.first ] elsif ["x"].include?(type.chars.last) [ Olib.methodize(type + "es").to_sym, type ] else [ Olib.methodize(type + "s").to_sym, type ] end } end |