Module: ActiveModel::Access
- Included in:
- Model
- Defined in:
- lib/active_model/access.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#slice(*methods) ⇒ Object
8 9 10 |
# File 'lib/active_model/access.rb', line 8 def slice(*methods) methods.flatten.index_with { |method| public_send(method) }.with_indifferent_access end |
#values_at(*methods) ⇒ Object
12 13 14 |
# File 'lib/active_model/access.rb', line 12 def values_at(*methods) methods.flatten.map! { |method| public_send(method) } end |