<commit_before>module ToSource
  class Command
    include Adamantium::Flat

    NULL = Class.new(self) do
      def run(_state)
      end
    end.new.freeze

    class Token < self
      attr_reader :content

      def run(state)
        state.push(self)
      end

    private

      def initialize(content)
        @content = content
      end
    end

    class Shift < self
      include Equalizer.new(:width)

      attr_reader :width

      def run(state)
        state.shift(width)
      end

    private

      def initialize(width)
        @width = width
      end

      INDENT   = Shift.new( 2)
      UNINDENT = Shift.new(-2)

    end
  end
end<commit_msg>Add yard docs for command<commit_after>module ToSource
  # Abstract base class for emitter command
  class Command
    include Adamantium::Flat

    # A null command
    NULL = Class.new(self) do

      # Run command
      #
      # @param [State] _state
      #
      # @return [self]
      #
      # @api private
      #
      def run(_state)
        self
      end
    end.new.freeze

    # Command that emits token
    class Token < self
      attr_reader :content

      # Run command
      #
      # @param [State] state
      #
      # @return [self]
      #
      def run(state)
        state.push(self)
        self
      end

    private

      # Initialize object
      #
      # @param [String] content
      #
      # @return [undefined]
      #
      # @api private
      #
      def initialize(content)
        @content = content
      end

    end

    # Command that does a shift
    class Shift < self
      include Equalizer.new(:width)

      attr_reader :width

      # Run command
      #
      # @param [State]
      #
      # @return [self]
      #
      # @api private
      #
      def run(state)
        state.shift(width)
        self
      end

    private

      # Initialize command
      #
      # @param [Fixnum] with
      #
      # @return [undefined]
      #
      # @api private
      #
      def initialize(width)
        @width = width
      end

      INDENT   = Shift.new( 2)
      UNINDENT = Shift.new(-2)
    end

  end
end
{'fraction_non_alphanumeric': 0.08059981255857544, 'fraction_numerical': 0.0018744142455482662, 'mean_word_length': 1.4596774193548387, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7024449', 'n_tokens_mistral': 673, 'n_tokens_neox': 632, 'n_words': 174}