Class: Rubrowser::Renderer

Inherits:
Object
  • Object
show all
Includes:
ERB::Util
Defined in:
lib/rubrowser/renderer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(options = {}) ⇒ Object

Accepted options are: files: list of file paths to parse toolbox: bool, show/hide toolbox



10
11
12
# File 'lib/rubrowser/renderer.rb', line 10

def self.call(options = {})
  new(options).call
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
# File 'lib/rubrowser/renderer.rb', line 14

def call
  if @json
    output.write(data)
  else
    output.write(erb(:index))
  end
end