Class: Noraneko::ViewProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/noraneko/view_processor.rb

Instance Method Summary collapse

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