class ThinpXML::EmitterDetail::ThinpEmitter
Public Class Methods
new(out)
click to toggle source
# File lib/thinp_xml/thinp/emit.rb, line 9 def initialize(out) @e = ThinpXML::Base::Emitter.new(out) end
Public Instance Methods
emit_device(dev, &block)
click to toggle source
# File lib/thinp_xml/thinp/emit.rb, line 17 def emit_device(dev, &block) @e.emit_tag(dev, 'device', :dev_id, :mapped_blocks, :transaction, :creation_time, :snap_time, &block) end
emit_mapping(m)
click to toggle source
# File lib/thinp_xml/thinp/emit.rb, line 21 def emit_mapping(m) if m.length == 1 @e.emit_line("<single_mapping origin_block=\"#{m.origin_begin}\" data_block=\"#{m.data_begin}\" time=\"#{m.time}\"/>") else @e.emit_tag(m, 'range_mapping', :origin_begin, :data_begin, :length, :time) end end
emit_superblock(sb, &block)
click to toggle source
# File lib/thinp_xml/thinp/emit.rb, line 13 def emit_superblock(sb, &block) @e.emit_tag(sb, 'superblock', :uuid, :time, :transaction, :flags, :version, :data_block_size, :nr_data_blocks, &block) end