Class: Dry::CLI::Help::Formatter::Row

Inherits:
Data
  • Object
show all
Defined in:
lib/dry/cli/help/formatter.rb

Overview

One line of a definition list: a term, and the text that describes it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(term:, text: nil, term_style: :command, text_style: nil) ⇒ Row

Returns a new instance of Row.



17
18
19
# File 'lib/dry/cli/help/formatter.rb', line 17

def initialize(term:, text: nil, term_style: :command, text_style: nil)
  super
end

Instance Attribute Details

#term ⇒ Object (readonly)

Returns the value of attribute term

Returns:

  • (Object) —

    the current value of term



16
17
18
# File 'lib/dry/cli/help/formatter.rb', line 16

def term
  @term
end

#term_style ⇒ Object (readonly)

Returns the value of attribute term_style

Returns:

  • (Object) —

    the current value of term_style



16
17
18
# File 'lib/dry/cli/help/formatter.rb', line 16

def term_style
  @term_style
end

#text ⇒ Object (readonly)

Returns the value of attribute text

Returns:

  • (Object) —

    the current value of text



16
17
18
# File 'lib/dry/cli/help/formatter.rb', line 16

def text
  @text
end

#text_style ⇒ Object (readonly)

Returns the value of attribute text_style

Returns:

  • (Object) —

    the current value of text_style



16
17
18
# File 'lib/dry/cli/help/formatter.rb', line 16

def text_style
  @text_style
end