Sha256: 1a9090562638f834b8a04934f2f5b7b927bc0522daa6775cf8efaa55ec933d6e
Contents?: true
Size: 966 Bytes
Versions: 8
Compression:
Stored size: 966 Bytes
Contents
require "forwardable" module CutePrint class Configure extend Forwardable # Configure an instance of printer. # @api private # @param [Printer] printer # @yield [Configure] def initialize(printer) @printer = printer yield self end def_delegator :@printer, :set_defaults, :reset def self.delegate_accessor(name) def_delegator :@printer, name def_delegator :@printer, "#{name}=" end # @!attribute [rw] location_format # @return [String] The location format # @see Printer#location_format delegate_accessor :location_format # @!attribute [rw] out # @return [#puts] The file to write to # @see Printer#out delegate_accessor :out # @!attribute [rw] term_width # @return [Integer, Symbol] The terminal width, or :detect if it # is being detected automatically. # @see Printer#term_width delegate_accessor :term_width end end
Version data entries
8 entries across 8 versions & 1 rubygems