Class: Getch::Tree::Os
- Inherits:
-
Object
- Object
- Getch::Tree::Os
- 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
-
#initialize ⇒ Os
constructor
A new instance of Os.
- #select ⇒ Object
Constructor Details
#initialize ⇒ Os
12 13 14 15 |
# File 'lib/getch/tree.rb', line 12 def initialize @os = OPTIONS[:os] @log = Log.new end |
Instance Method Details
#select ⇒ Object
17 18 19 |
# File 'lib/getch/tree.rb', line 17 def select OS_TREE[@os.to_sym] || @log.fatal('OS no found') end |