Class: Noraneko::ViewProcessor
- Inherits:
-
Object
- Object
- Noraneko::ViewProcessor
- Defined in:
- lib/noraneko/view_processor.rb
Instance Method Summary collapse
-
#initialize(registry:, filepath:) ⇒ ViewProcessor
constructor
A new instance of ViewProcessor.
- #process(text) ⇒ Object
Constructor Details
#initialize(registry:, filepath:) ⇒ ViewProcessor
Returns a new instance of ViewProcessor.
3 4 5 6 7 8 |
# File 'lib/noraneko/view_processor.rb', line 3 def initialize(registry:, filepath:) @registry = registry @filepath = filepath @nview = Noraneko::NView.new(@filepath, :partial) registry.put(@nview) end |
Instance Method Details
#process(text) ⇒ Object
10 11 12 13 14 |
# File 'lib/noraneko/view_processor.rb', line 10 def process(text) text.each_line do |line| process_line(line) end end |