Module: Fold::SliceFactory::ClassMethods
- Defined in:
- lib/fold/slice_factory.rb
Instance Method Summary collapse
Instance Method Details
#defined_slices ⇒ Object
58 59 60 |
# File 'lib/fold/slice_factory.rb', line 58 def defined_slices @slices||= [] end |
#slices(id, regex = AbstractSlice::Regex, &block) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/fold/slice_factory.rb', line 48 def slices id, regex=AbstractSlice::Regex, &block slice= Class.new(AbstractSlice) slice.const_set :Regex, regex slice.const_set :Block, block const_set id, slice defined_slices << slice end |