Class: Attributes::List
Instance Method Summary collapse
Instance Method Details
#<<(element) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/bj/attributes.rb', line 6 def << element super self ensure uniq! index! end |
#include?(element) ⇒ Boolean
17 18 19 20 |
# File 'lib/bj/attributes.rb', line 17 def include? element @index ||= Hash.new @index[element] ? true : false end |