Class: TreeHaver::AdapterInfo
- Inherits:
-
Struct
- Object
- Struct
- TreeHaver::AdapterInfo
- Defined in:
- lib/tree_haver/contracts.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#backend_ref ⇒ Object
Returns the value of attribute backend_ref.
-
#supported_policies ⇒ Object
Returns the value of attribute supported_policies.
-
#supports_dialects ⇒ Object
Returns the value of attribute supports_dialects.
Instance Method Summary collapse
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend
20 21 22 |
# File 'lib/tree_haver/contracts.rb', line 20 def backend @backend end |
#backend_ref ⇒ Object
Returns the value of attribute backend_ref
20 21 22 |
# File 'lib/tree_haver/contracts.rb', line 20 def backend_ref @backend_ref end |
#supported_policies ⇒ Object
Returns the value of attribute supported_policies
20 21 22 |
# File 'lib/tree_haver/contracts.rb', line 20 def supported_policies @supported_policies end |
#supports_dialects ⇒ Object
Returns the value of attribute supports_dialects
20 21 22 |
# File 'lib/tree_haver/contracts.rb', line 20 def supports_dialects @supports_dialects end |
Instance Method Details
#to_h ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/tree_haver/contracts.rb', line 21 def to_h { backend: backend, **(backend_ref ? { backend_ref: backend_ref.to_h } : {}), supports_dialects: supports_dialects, supported_policies: deep_dup(supported_policies || []) } end |