Class: Getch::Tree::Os

Inherits:
Object
  • Object
show all
Defined in:
lib/getch/tree.rb

Overview

call class depend of the os choosen

Constant Summary collapse

OS_TREE =
{
  gentoo: Gentoo,
  void: Void
}.freeze

Instance Method Summary collapse

Constructor Details

#initializeOs

Returns a new instance of Os.



12
13
14
15
# File 'lib/getch/tree.rb', line 12

def initialize
  @os = OPTIONS[:os]
  @log = Log.new
end

Instance Method Details

#selectObject



17
18
19
# File 'lib/getch/tree.rb', line 17

def select
  OS_TREE[@os.to_sym] || @log.fatal('OS no found')
end