Class: LooseErbs::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/loose_erbs/scanner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app = Rails.application) ⇒ Scanner

Returns a new instance of Scanner.



13
14
15
# File 'lib/loose_erbs/scanner.rb', line 13

def initialize(app = Rails.application)
  @app = app
end

Instance Attribute Details

#parser_classObject

Returns the value of attribute parser_class.



5
6
7
# File 'lib/loose_erbs/scanner.rb', line 5

def parser_class
  @parser_class
end

Instance Method Details

#rendersObject



17
18
19
20
21
22
23
24
25
# File 'lib/loose_erbs/scanner.rb', line 17

def renders
  parsed_renders = []

  each_file_in(helper_paths) do |helper_path|
    parsed_renders.concat parsed_renders_in(helper_path)
  end.uniq

  parsed_renders
end