Sha256: b200d1baa13c56fdc74e1ad7298d6b8c419168b2cc963943aad471f9fb136593

Contents?: true

Size: 305 Bytes

Versions: 13

Compression:

Stored size: 305 Bytes

Contents

# frozen_string_literal: true

require_relative 'value_equality'

module Shivers
  class Format
    include ValueEquality

    def initialize(formatter)
      @formatter = formatter
    end

    def visit(visitor)
      @formatter.call(visitor)
    end

    def state
      [@formatter]
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shivers-0.6.0.pre.15 lib/shivers/format.rb
shivers-0.6.0.pre.14 lib/shivers/format.rb
shivers-0.6.0.pre.13 lib/shivers/format.rb
shivers-0.6.0.pre.12 lib/shivers/format.rb
shivers-0.6.0.pre.11 lib/shivers/format.rb
shivers-0.6.0.pre.10 lib/shivers/format.rb
shivers-0.6.0.pre.9 lib/shivers/format.rb
shivers-0.6.0.pre.8 lib/shivers/format.rb
shivers-0.6.0.pre.7 lib/shivers/format.rb
shivers-0.6.0.pre.6 lib/shivers/format.rb
shivers-0.6.0.pre.5 lib/shivers/format.rb
shivers-0.6.0.pre.4 lib/shivers/format.rb
shivers-0.6.0.pre.3 lib/shivers/format.rb