Module: DeepDive::CMeth
- Defined in:
- lib/deep_dive/deep_dive.rb
Constant Summary collapse
- @@exclusion =
[]
Instance Method Summary collapse
-
#exclude(*list, &block) ⇒ Object
exclusion list of instance variables to dup/clone.
-
#excluded?(sym, ob = nil) ⇒ Boolean
Internal function not meant to be called by the application.
Instance Method Details
#exclude(*list, &block) ⇒ Object
exclusion list of instance variables to dup/clone
128 129 130 131 132 |
# File 'lib/deep_dive/deep_dive.rb', line 128 def exclude(*list, &block) @@exclusion << list.map { |s| "@#{s}".to_sym } @@exclusion.flatten! @@exclusion_block = block if block_given? end |
#excluded?(sym, ob = nil) ⇒ Boolean
Internal function not meant to be called by the application.
135 136 137 138 139 |
# File 'lib/deep_dive/deep_dive.rb', line 135 def excluded?(sym, ob = nil) if defined? @@exclusion_block @@exclusion_block.(sym, ob) end || @@exclusion.member?(sym) end |