Method: EasyType::Group#group_for
- Defined in:
- lib/easy_type/group.rb
#group_for(parameter_or_property) ⇒ Symbol
returns the group name for a given parameter or property. If the group doesn’t exist, it will raise an error
58 59 60 61 62 63 |
# File 'lib/easy_type/group.rb', line 58 def group_for(parameter_or_property) @content.each_pair do | key, value| return key if value.include?(parameter_or_property) end fail "easy_type: #{parameter_or_property} not found in any group" end |