Method: #can_has
- Defined in:
- lib/main/dsl.rb
#can_has(ptype, *a, &b) ⇒ Object
37 38 39 40 41 |
# File 'lib/main/dsl.rb', line 37 def can_has(ptype, *a, &b) key = a.map{|s| s.to_s}.sort_by{|s| -s.size }.first can_has_hash.update key => [ptype, a, b] key end |