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.



64
65
66
67
68
69
70
# File 'lib/webhookdb/db_adapter.rb', line 64

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.



62
63
64
# File 'lib/webhookdb/db_adapter.rb', line 62

def name
  @name
end

#tableObject (readonly)

Returns the value of attribute table.



62
63
64
# File 'lib/webhookdb/db_adapter.rb', line 62

def table
  @table
end

#targetsObject (readonly)

Returns the value of attribute targets.



62
63
64
# File 'lib/webhookdb/db_adapter.rb', line 62

def targets
  @targets
end

#uniqueObject (readonly)

Returns the value of attribute unique.



62
63
64
# File 'lib/webhookdb/db_adapter.rb', line 62

def unique
  @unique
end

#whereObject (readonly)

Returns the value of attribute where.



62
63
64
# File 'lib/webhookdb/db_adapter.rb', line 62

def where
  @where
end

Instance Method Details

#_defaultsObject



72
73
74
# File 'lib/webhookdb/db_adapter.rb', line 72

def _defaults
  return {unique: false}
end