Method: Wool::Warning.type
- Defined in:
- lib/wool/warning.rb
.type(*args) ⇒ Object
Modified cattr_get_and_setter that updates the class’s short_name and registers the class as a member of the given type.
59 60 61 62 63 64 65 66 67 |
# File 'lib/wool/warning.rb', line 59 def self.type(*args) if args.any? @type = args.first.to_s all_types[@type] << self self.short_name = @type[0,2].upcase + all_types[@type].size.to_s else @type end end |