Sha256: 2487a1e1f9b99d23235c4ce3b6944c5f70193bb0efcf22e876cccdfe2191db6c
Contents?: true
Size: 529 Bytes
Versions: 12
Compression:
Stored size: 529 Bytes
Contents
class BBCoder class Buffer attr_accessor :_internal, :tags def initialize @_internal = {} @tags = BBCoder::BufferTags.new(self) end def push(content) _internal[depth] ||= "" _internal[depth] += content end def pop(depth_modifier = 0) _internal.delete(depth + depth_modifier) end # end of processing, insert any orphaned tags without conversion def join push(tags.join) end # delegates to tags def depth tags.size end end end
Version data entries
12 entries across 12 versions & 1 rubygems