Class: Hobostove::Cli::RoomPicker
- Inherits:
-
Object
- Object
- Hobostove::Cli::RoomPicker
- Defined in:
- lib/hobostove/cli/room_picker.rb
Instance Method Summary collapse
-
#initialize(stdin, stdout) ⇒ RoomPicker
constructor
A new instance of RoomPicker.
- #run ⇒ Object
Constructor Details
#initialize(stdin, stdout) ⇒ RoomPicker
Returns a new instance of RoomPicker.
4 5 6 7 |
# File 'lib/hobostove/cli/room_picker.rb', line 4 def initialize(stdin, stdout) @stdin = stdin @stdout = stdout end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/hobostove/cli/room_picker.rb', line 9 def run @config = YAML.load(File.read(Hobostove::Configuration.config_file)) if @config.count == 1 Hobostove::Configuration.current_room = 0 else pick_room end end |