Class: M3u8::CLI::InspectCommand
- Inherits:
-
Object
- Object
- M3u8::CLI::InspectCommand
- Defined in:
- lib/m3u8/cli/inspect_command.rb
Overview
InspectCommand displays metadata about a playlist
Constant Summary collapse
- MEDIA_WIDTH =
12- MASTER_WIDTH =
23
Instance Method Summary collapse
-
#initialize(playlist, stdout, json: false) ⇒ InspectCommand
constructor
A new instance of InspectCommand.
- #run ⇒ Object
Constructor Details
#initialize(playlist, stdout, json: false) ⇒ InspectCommand
Returns a new instance of InspectCommand.
10 11 12 13 14 |
# File 'lib/m3u8/cli/inspect_command.rb', line 10 def initialize(playlist, stdout, json: false) @playlist = playlist @stdout = stdout @json = json end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/m3u8/cli/inspect_command.rb', line 16 def run return print_json if @json if @playlist.master? print_master else print_media end 0 end |