Class: Copilot::CanvasAction

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

Overview

An action exposed by a canvas.

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



79
80
81
# File 'lib/copilot/types.rb', line 79

def description
  @description
end

#input_schemaObject

Returns the value of attribute input_schema

Returns:

  • (Object)

    the current value of input_schema



79
80
81
# File 'lib/copilot/types.rb', line 79

def input_schema
  @input_schema
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



79
80
81
# File 'lib/copilot/types.rb', line 79

def name
  @name
end

Instance Method Details

#to_hObject



80
81
82
83
84
# File 'lib/copilot/types.rb', line 80

def to_h
  h = { name: name, description: description }
  h[:inputSchema] = input_schema unless input_schema.nil?
  h
end