Class: Unroller::ClassExclusion
- Inherits:
-
Object
- Object
- Unroller::ClassExclusion
- Defined in:
- lib/unroller.rb
Overview
AKA stack frame?
Instance Attribute Summary collapse
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
Instance Method Summary collapse
-
#initialize(klass, *flags) ⇒ ClassExclusion
constructor
A new instance of ClassExclusion.
Constructor Details
#initialize(klass, *flags) ⇒ ClassExclusion
Returns a new instance of ClassExclusion.
158 159 160 161 162 163 164 165 166 |
# File 'lib/unroller.rb', line 158 def initialize(klass, *flags) raise ArgumentError if !(Module === klass || String === klass || Symbol === klass || Regexp === klass) klass = klass.name if Module === klass @regexp = Regexp === klass ? klass : /^#{klass.to_s}$/ # (Or should we escape it?) @recursive = true if flags.include?(:recursive) end |
Instance Attribute Details
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
157 158 159 |
# File 'lib/unroller.rb', line 157 def regexp @regexp end |