Sha256: 2bb5d00a96433e91819dfb1841e7884b0e503b8ad7500eb45a04a6ba225f6465

Contents?: true

Size: 324 Bytes

Versions: 1

Compression:

Stored size: 324 Bytes

Contents

# frozen_string_literal: true

require 'json'

module Cosensee
  module Node
    # for command line
    CommandLine = Data.define(:content, :prompt, :raw) do
      alias_method :to_s, :raw

      def to_obj
        "#{prompt} #{content}"
      end

      def to_json(*)
        to_obj.to_json(*)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cosensee-0.8.0 lib/cosensee/node/command_line.rb