Class: Webhookdb::DBAdapter::TableDescriptor

Inherits:
TypedStruct
  • Object
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) ⇒ TableDescriptor

Returns a new instance of TableDescriptor.



89
90
91
92
93
94
# File 'lib/webhookdb/db_adapter.rb', line 89

def initialize(**kwargs)
  super
  self.typecheck!(:table, Table)
  self.typecheck!(:columns, Array)
  self.typecheck!(:indices, Array)
end

Instance Attribute Details

#columnsArray<Column>

Returns:



103
104
105
# File 'lib/webhookdb/db_adapter.rb', line 103

def columns
  @columns
end

#indicesArray<Index>

Returns:



103
104
105
# File 'lib/webhookdb/db_adapter.rb', line 103

def indices
  @indices
end

#tableTable

Returns:



103
104
105
# File 'lib/webhookdb/db_adapter.rb', line 103

def table
  @table
end

Instance Method Details

#_defaultsObject



103
104
105
# File 'lib/webhookdb/db_adapter.rb', line 103

def _defaults
  return {indices: []}
end