Class: Webhookdb::DBAdapter::Index

Inherits:
TypedStruct show all
Defined in:
lib/webhookdb/db_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from TypedStruct

#[], #_apply, #as_json, #change

Constructor Details

#initialize(**kwargs) ⇒ Index

Returns a new instance of Index.



60
61
62
63
64
65
66
# File 'lib/webhookdb/db_adapter.rb', line 60

def initialize(**kwargs)
  super
  self.typecheck!(:name, Symbol)
  self.typecheck!(:table, Table)
  self.typecheck!(:targets, Array)
  self.typecheck!(:unique, :boolean)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



58
59
60
# File 'lib/webhookdb/db_adapter.rb', line 58

def name
  @name
end

#tableObject (readonly)

Returns the value of attribute table.



58
59
60
# File 'lib/webhookdb/db_adapter.rb', line 58

def table
  @table
end

#targetsObject (readonly)

Returns the value of attribute targets.



58
59
60
# File 'lib/webhookdb/db_adapter.rb', line 58

def targets
  @targets
end

#uniqueObject (readonly)

Returns the value of attribute unique.



58
59
60
# File 'lib/webhookdb/db_adapter.rb', line 58

def unique
  @unique
end

#whereObject (readonly)

Returns the value of attribute where.



58
59
60
# File 'lib/webhookdb/db_adapter.rb', line 58

def where
  @where
end

Instance Method Details

#_defaultsObject



68
69
70
# File 'lib/webhookdb/db_adapter.rb', line 68

def _defaults
  return {unique: false}
end