Class: Markita::Preprocess

Inherits:
Object
  • Object
show all
Defined in:
lib/markita/preprocess.rb

Overview

Preprocess template lines

Defined Under Namespace

Classes: IterationVariables

Instance Method Summary collapse

Constructor Details

#initialize(line_getter) ⇒ Preprocess

Returns a new instance of Preprocess.



54
55
56
57
# File 'lib/markita/preprocess.rb', line 54

def initialize(line_getter)
  @line_getter = line_getter
  @iv = IterationVariables.new
end

Instance Method Details

#getsObject



45
46
47
48
49
50
51
52
# File 'lib/markita/preprocess.rb', line 45

def gets
  while (line = @line_getter.gets)
    next if @iv.next?(line)

    return @iv.to_s
  end
  nil
end