Class: Copilot::SlashCommandInput

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

Overview

Input configuration for a slash command.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#completionObject

Returns the value of attribute completion

Returns:

  • (Object)

    the current value of completion



408
409
410
# File 'lib/copilot/types.rb', line 408

def completion
  @completion
end

#hintObject

Returns the value of attribute hint

Returns:

  • (Object)

    the current value of hint



408
409
410
# File 'lib/copilot/types.rb', line 408

def hint
  @hint
end

Instance Method Details

#to_hObject



409
410
411
412
413
# File 'lib/copilot/types.rb', line 409

def to_h
  h = { hint: hint }
  h[:completion] = completion if completion
  h
end