Class: OnyxCord::Components::Checkbox

Inherits:
Object
  • Object
show all
Defined in:
lib/onyxcord/models/component.rb

Overview

A checkbox that can be ticked in a modal.

Instance Attribute Summary collapse

Instance Attribute Details

#custom_idString (readonly)

Returns the developer-defined identifier of the checkbox.

Returns:

  • (String)

    the developer-defined identifier of the checkbox.



580
581
582
# File 'lib/onyxcord/models/component.rb', line 580

def custom_id
  @custom_id
end

#idInteger (readonly)

Returns the numeric identifier of the checkbox.

Returns:

  • (Integer)

    the numeric identifier of the checkbox.



573
574
575
# File 'lib/onyxcord/models/component.rb', line 573

def id
  @id
end

#valuetrue, false (readonly) Also known as: value?

Returns whether or not the checkbox was selected.

Returns:

  • (true, false)

    whether or not the checkbox was selected.



576
577
578
# File 'lib/onyxcord/models/component.rb', line 576

def value
  @value
end