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 NOT 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 NOT dup/clone
155 156 157 158 159 |
# File 'lib/deep_dive/deep_dive.rb', line 155 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.
162 163 164 165 166 |
# File 'lib/deep_dive/deep_dive.rb', line 162 def excluded?(sym, ob = nil) if defined? @@exclusion_block @@exclusion_block.(sym, ob) end || @@exclusion.member?(sym) end |