Class: LLM::Repl::Command::Parameter Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/llm/repl/command.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



16
17
18
# File 'lib/llm/repl/command.rb', line 16

def description
  @description
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



16
17
18
# File 'lib/llm/repl/command.rb', line 16

def index
  @index
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



16
17
18
# File 'lib/llm/repl/command.rb', line 16

def name
  @name
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



16
17
18
# File 'lib/llm/repl/command.rb', line 16

def options
  @options
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



16
17
18
# File 'lib/llm/repl/command.rb', line 16

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



16
17
18
# File 'lib/llm/repl/command.rb', line 16

def value
  @value
end

Instance Method Details

#optional?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


32
33
34
# File 'lib/llm/repl/command.rb', line 32

def optional?
  !required?
end

#required!void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Mark the parameter as required



26
27
28
# File 'lib/llm/repl/command.rb', line 26

def required!
  options[:required] = true
end

#required?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


19
20
21
# File 'lib/llm/repl/command.rb', line 19

def required?
  options[:required] == true
end