Class: Abt::Cli::GlobalCommands::Share
Instance Attribute Summary collapse
Attributes inherited from BaseCommand
#ari, #flags
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseCommand
flags, #initialize
Instance Attribute Details
#cli ⇒ Object
Returns the value of attribute cli.
15
16
17
|
# File 'lib/abt/cli/global_commands/share.rb', line 15
def cli
@cli
end
|
Class Method Details
.description ⇒ Object
11
12
13
|
# 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 ⇒ Object
7
8
9
|
# File 'lib/abt/cli/global_commands/share.rb', line 7
def self.usage
"abt share"
end
|
Instance Method Details
17
18
19
20
|
# File 'lib/abt/cli/global_commands/share.rb', line 17
def perform
warn("Printing project configuration")
puts share_string
end
|
#share_string ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
|
# 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
|