Module: HashOut::Excludable
- Defined in:
- lib/hash_out/excludable.rb
Instance Method Summary collapse
- #delete_exclusions(methods) ⇒ Object
- #exclude_from_hash_out ⇒ Object
- #exclusions ⇒ Object
- #prepare_exclusions(methods) ⇒ Object
Instance Method Details
#delete_exclusions(methods) ⇒ Object
15 16 17 |
# File 'lib/hash_out/excludable.rb', line 15 def delete_exclusions methods exclusions.each { |method| methods.delete method } end |
#exclude_from_hash_out ⇒ Object
7 8 9 |
# File 'lib/hash_out/excludable.rb', line 7 def exclude_from_hash_out exclusions.push last_call end |
#exclusions ⇒ Object
3 4 5 |
# File 'lib/hash_out/excludable.rb', line 3 def exclusions @exclusions ||= [] end |
#prepare_exclusions(methods) ⇒ Object
11 12 13 |
# File 'lib/hash_out/excludable.rb', line 11 def prepare_exclusions methods methods.each { |method| send method } end |