Class: Shipeasy::Admin::Generated::ConnectorProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/shipeasy_admin/models/connector_provider.rb

Constant Summary collapse

GOOGLE_SHEETS =
"google_sheets".freeze
GITHUB =
"github".freeze
SLACK =
"slack".freeze
CLAUDE_TRIGGER =
"claude_trigger".freeze
CURSOR_TRIGGER =
"cursor_trigger".freeze
COPILOT_TRIGGER =
"copilot_trigger".freeze
JULES_TRIGGER =
"jules_trigger".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



26
27
28
# File 'lib/shipeasy_admin/models/connector_provider.rb', line 26

def self.all_vars
  @all_vars ||= [GOOGLE_SHEETS, GITHUB, SLACK, CLAUDE_TRIGGER, CURSOR_TRIGGER, COPILOT_TRIGGER, JULES_TRIGGER].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



33
34
35
# File 'lib/shipeasy_admin/models/connector_provider.rb', line 33

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



40
41
42
43
# File 'lib/shipeasy_admin/models/connector_provider.rb', line 40

def build_from_hash(value)
  return value if ConnectorProvider.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #ConnectorProvider"
end