Sha256: d9c6ff5cf09bbf3e6142d8124823616a9850c796da8ecea152e3ec9fe8d814e4

Contents?: true

Size: 284 Bytes

Versions: 1

Compression:

Stored size: 284 Bytes

Contents

# frozen_string_literal: true

require 'json'

module Cosensee
  # 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cosensee-0.6.0 lib/cosensee/command_line.rb