Module: Toy::Inspect::ClassMethods
- Defined in:
- lib/toy/inspect.rb
Instance Method Summary collapse
Instance Method Details
#inspect ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/toy/inspect.rb', line 6 def inspect keys = attributes.keys nice_string = keys.sort.map do |name| type = attributes[name].type "#{name}:#{type}" end.join(" ") "#{name}(#{nice_string})" end |