Class: RubyCritic::Browser

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/browser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(report_path) ⇒ Browser

Returns a new instance of Browser.


8
9
10
# File 'lib/rubycritic/browser.rb', line 8

def initialize(report_path)
  @report_path = report_path
end

Instance Attribute Details

#report_pathObject (readonly)

Returns the value of attribute report_path


6
7
8
# File 'lib/rubycritic/browser.rb', line 6

def report_path
  @report_path
end

Instance Method Details

#openObject


12
13
14
15
16
# File 'lib/rubycritic/browser.rb', line 12

def open
  Launchy.open(report_path) do |exception|
    puts "Attempted to open #{report_path} and failed because #{exception}"
  end
end