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



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

def description
  @description
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



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

def index
  @index
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



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

def options
  @options
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



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

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



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

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)


43
44
45
# File 'lib/llm/repl/command.rb', line 43

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



37
38
39
# File 'lib/llm/repl/command.rb', line 37

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)


30
31
32
# File 'lib/llm/repl/command.rb', line 30

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