Sha256: 61ddd77b21f3036df8d71799c79afe02196ad59c5951b7c0f69649bcc6e2616a
Contents?: true
Size: 803 Bytes
Versions: 12
Compression:
Stored size: 803 Bytes
Contents
module FLV module Edit module Processor # Printer is a small utility class to print out FLV chunks. class Printer def initialize(io, options={}) @io = io @options = {:width => 50, :column_width => 15, :separator => "| "}.merge(options) @margin_left = "" end def header(left, right) @io.puts left + @options[:separator] + right @margin_left = " "*left.length + @options[:separator] end # Prints out a hash (or any list of key-value pairs) in two columns def values(hash) hash.each do |key, value| @io.puts "#{@margin_left}#{key.to_s.ljust(@options[:column_width])}: #{value.inspect.delete(':"')}" end end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems