Class: WhirledPeas::Command::Play::FilePlayer
- Inherits:
-
Object
- Object
- WhirledPeas::Command::Play::FilePlayer
- Defined in:
- lib/whirled_peas/command/play.rb
Instance Method Summary collapse
-
#initialize(wpz_file) ⇒ FilePlayer
constructor
A new instance of FilePlayer.
- #play ⇒ Object
Constructor Details
#initialize(wpz_file) ⇒ FilePlayer
Returns a new instance of FilePlayer.
51 52 53 |
# File 'lib/whirled_peas/command/play.rb', line 51 def initialize(wpz_file) @wpz_file = wpz_file end |
Instance Method Details
#play ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/whirled_peas/command/play.rb', line 55 def play require 'whirled_peas/device/screen' require 'whirled_peas/utils/ansi' require 'whirled_peas/utils/file_handler' Utils::Ansi.with_screen do screen = Device::Screen.new rendered_frames = Utils::FileHandler.read(wpz_file) screen.handle_rendered_frames(rendered_frames) end end |