Class: Ghit::RepoLocator

Inherits:
Object
  • Object
show all
Defined in:
lib/ghit/repo_locator.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page = nil) ⇒ RepoLocator

Returns a new instance of RepoLocator.



10
11
12
13
# File 'lib/ghit/repo_locator.rb', line 10

def initialize(page = nil)
  @page    = page
  @globals = Ghit::Globals.new
end

Class Method Details

.open(page = nil) ⇒ Object



5
6
7
# File 'lib/ghit/repo_locator.rb', line 5

def open page = nil
  new(page).open
end

Instance Method Details

#openObject



15
16
17
18
19
20
21
# File 'lib/ghit/repo_locator.rb', line 15

def open
  if RUBY_PLATFORM =~ /darwin/i
    open_for_osx
  elsif RUBY_PLATFORM =~ /linux/i
    open_for_linux
  end
end