Class: Copilot::SlashCommandInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Information about a slash command.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases

Returns:

  • (Object)

    the current value of aliases



417
418
419
# File 'lib/copilot/types.rb', line 417

def aliases
  @aliases
end

#allow_during_agent_executionObject

Returns the value of attribute allow_during_agent_execution

Returns:

  • (Object)

    the current value of allow_during_agent_execution



417
418
419
# File 'lib/copilot/types.rb', line 417

def allow_during_agent_execution
  @allow_during_agent_execution
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



417
418
419
# File 'lib/copilot/types.rb', line 417

def description
  @description
end

#experimentalObject

Returns the value of attribute experimental

Returns:

  • (Object)

    the current value of experimental



417
418
419
# File 'lib/copilot/types.rb', line 417

def experimental
  @experimental
end

#inputObject

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



417
418
419
# File 'lib/copilot/types.rb', line 417

def input
  @input
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



417
418
419
# File 'lib/copilot/types.rb', line 417

def kind
  @kind
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



417
418
419
# File 'lib/copilot/types.rb', line 417

def name
  @name
end

Instance Method Details

#to_hObject



422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/copilot/types.rb', line 422

def to_h
  h = {
    allowDuringAgentExecution: allow_during_agent_execution,
    description: description,
    kind: kind,
    name: name,
  }
  h[:aliases] = aliases if aliases
  h[:experimental] = experimental unless experimental.nil?
  h[:input] = input.to_h if input
  h
end