Class: Dry::CLI::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/patches/dry-cli.rb

Direct Known Subclasses

SQA::Commands::Base

Class Method Summary collapse

Class Method Details

Provides a way to set a custom, command specific footer.

Parameters:

  • a_string (String) (defaults to: nil)

    optional, footer text

Returns:



157
158
159
160
161
162
163
# File 'lib/patches/dry-cli.rb', line 157

def self.footer(a_string=nil)
	if a_string.nil?
		@footer_string
	else
		@footer_string = a_string
	end
end

Provides a way to set a global custom footer to overwrite the default one.

Parameters:

  • a_string (String) (defaults to: nil)

    optional, global footer text

Returns:

  • (String)

    global footer text



183
184
185
186
187
188
189
# File 'lib/patches/dry-cli.rb', line 183

def self.global_footer(a_string=nil)
	if a_string.nil?
		@@global_footer_string
	else
		@@global_footer_string = a_string
	end
end

.global_header(a_string = nil) ⇒ String

Provides a way to set a global custom header to overwrite the default one.

Parameters:

  • a_string (String) (defaults to: nil)

    optional, global header text

Returns:

  • (String)

    global header text



170
171
172
173
174
175
176
# File 'lib/patches/dry-cli.rb', line 170

def self.global_header(a_string=nil)
	if a_string.nil?
		@@global_header_string
	else
		@@global_header_string = a_string
	end
end

.header(a_string = nil) ⇒ String

Provides a way to set a custom, command specific header.

Parameters:

  • a_string (String) (defaults to: nil)

    optional, header text

Returns:



144
145
146
147
148
149
150
# File 'lib/patches/dry-cli.rb', line 144

def self.header(a_string=nil)
	if a_string.nil?
		@header_string
	else
		@header_string = a_string
	end
end