Class: Craftsman::Decorator::Annotation

Inherits:
Base
  • Object
show all
Defined in:
lib/craftsman/decorator/annotation.rb

Constant Summary collapse

REGEX =
/^\/\/@require\s+(.*)\s*$/

Constants inherited from Base

Base::FILTER_EXT_MAPPING

Instance Method Summary collapse

Methods inherited from Base

#initialize, process

Constructor Details

This class inherits a constructor from Craftsman::Decorator::Base

Instance Method Details

#process(content) ⇒ Object



5
6
7
8
9
10
# File 'lib/craftsman/decorator/annotation.rb', line 5

def process(content)
  content.gsub(REGEX) do |m|
    target = m.match(REGEX)[1]
    build_filter(target)
  end
end