Sha256: f2c8f19393366b7e76621fc8b15ede6cec55a9734f25f9e3ae0337c2a9049254

Contents?: true

Size: 409 Bytes

Versions: 2

Compression:

Stored size: 409 Bytes

Contents

# -*- coding: utf-8 -*-
require 'singleton'

module Agate
  module Formatter
    # Echoes back the text passed to it.
    #
    # > 勉【べん】強【きょう】します
    class Plain
      include Singleton

      # Turns a regexp match object into a formatted string with ruby characters
      def self.format(match)
        "#{match[1]}#{match[2]}#{match[3]}#{match[4]}"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
agate-0.5.1 lib/agate/formatter/plain.rb
agate-0.5.0 lib/agate/formatter/plain.rb