Sha256: 4fafa303e6a3945309cd46fc50b98845be2a86c5ffb01660b9a4101ed8da8e74
Contents?: true
Size: 535 Bytes
Versions: 10
Compression:
Stored size: 535 Bytes
Contents
module Weskit::WML class Items include Enumerable, Mixins::Container, Mixins::Validator attr_reader :contents def formatter @formatter or Formatter.default end def formatter= item raise_unless Formatter, item @formatter = item end def initialize *items @contents = [] push *items end def to_s @contents.collect do |item| formatter.format_detached item, formatter end.join formatter.separator end alias_method :to_str, :to_s end end
Version data entries
10 entries across 10 versions & 1 rubygems