Class: Webhookdb::DBAdapter::Index
- Inherits:
-
TypedStruct
- Object
- TypedStruct
- Webhookdb::DBAdapter::Index
- Defined in:
- lib/webhookdb/db_adapter.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
-
#unique ⇒ Object
readonly
Returns the value of attribute unique.
-
#where ⇒ Object
readonly
Returns the value of attribute where.
Instance Method Summary collapse
- #_defaults ⇒ Object
-
#initialize(**kwargs) ⇒ Index
constructor
A new instance of Index.
Methods inherited from TypedStruct
#[], #_apply, #as_json, #change
Constructor Details
#initialize(**kwargs) ⇒ Index
Returns a new instance of Index.
66 67 68 69 70 71 72 |
# File 'lib/webhookdb/db_adapter.rb', line 66 def initialize(**kwargs) super self.typecheck!(:name, Symbol) self.typecheck!(:table, Table) self.typecheck!(:targets, Array) self.typecheck!(:unique, :boolean) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
64 65 66 |
# File 'lib/webhookdb/db_adapter.rb', line 64 def name @name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
64 65 66 |
# File 'lib/webhookdb/db_adapter.rb', line 64 def table @table end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
64 65 66 |
# File 'lib/webhookdb/db_adapter.rb', line 64 def targets @targets end |
#unique ⇒ Object (readonly)
Returns the value of attribute unique.
64 65 66 |
# File 'lib/webhookdb/db_adapter.rb', line 64 def unique @unique end |
#where ⇒ Object (readonly)
Returns the value of attribute where.
64 65 66 |
# File 'lib/webhookdb/db_adapter.rb', line 64 def where @where end |
Instance Method Details
#_defaults ⇒ Object
74 75 76 |
# File 'lib/webhookdb/db_adapter.rb', line 74 def _defaults return {unique: false} end |