Sha256: ad6525a7478b61059bf2065166d6a03a99f51bbc81fdb207318dd0a64848e0c7
Contents?: true
Size: 476 Bytes
Versions: 8
Compression:
Stored size: 476 Bytes
Contents
module Sablon class Numbering include Singleton attr_reader :definitions Definition = Struct.new(:numid, :style) do def inspect "#<Numbering #{numid}:#{style}" end end def initialize reset! end def reset! @numid = 1000 @definitions = [] end def register(style) @numid += 1 definition = Definition.new(@numid, style) @definitions << definition definition end end end
Version data entries
8 entries across 8 versions & 1 rubygems