class Abt::Cli::GlobalCommands::Share

Attributes

cli[R]

Public Class Methods

description() click to toggle source
# File lib/abt/cli/global_commands/share.rb, line 11
def self.description
  "Prints all project configuration as a single line of ARIs"
end
usage() click to toggle source
# File lib/abt/cli/global_commands/share.rb, line 7
def self.usage
  "abt share"
end

Public Instance Methods

perform() click to toggle source
# File lib/abt/cli/global_commands/share.rb, line 17
def perform
  warn("Printing project configuration")
  puts share_string
end
share_string() click to toggle source
# File lib/abt/cli/global_commands/share.rb, line 22
def share_string
  @share_string ||= begin
    aris = Abt.schemes.join(" ")

    input = StringIO.new(aris)
    output = StringIO.new
    Abt::Cli.new(argv: ["share"], output: output, input: input).perform

    output.string.strip.gsub(/\s+/, " ")
  end
end