Class: TreeHaver::FeatureProfile

Inherits:
Struct
  • Object
show all
Defined in:
lib/tree_haver/contracts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backendObject

Returns the value of attribute backend

Returns:

  • (Object)

    the current value of backend



37
38
39
# File 'lib/tree_haver/contracts.rb', line 37

def backend
  @backend
end

#backend_refObject

Returns the value of attribute backend_ref

Returns:

  • (Object)

    the current value of backend_ref



37
38
39
# File 'lib/tree_haver/contracts.rb', line 37

def backend_ref
  @backend_ref
end

#supported_policiesObject

Returns the value of attribute supported_policies

Returns:

  • (Object)

    the current value of supported_policies



37
38
39
# File 'lib/tree_haver/contracts.rb', line 37

def supported_policies
  @supported_policies
end

#supports_dialectsObject

Returns the value of attribute supports_dialects

Returns:

  • (Object)

    the current value of supports_dialects



37
38
39
# File 'lib/tree_haver/contracts.rb', line 37

def supports_dialects
  @supports_dialects
end

Instance Method Details

#to_hObject



38
39
40
41
42
43
44
45
# File 'lib/tree_haver/contracts.rb', line 38

def to_h
  {
    backend: backend,
    **(backend_ref ? { backend_ref: backend_ref.to_h } : {}),
    supports_dialects: supports_dialects,
    supported_policies: deep_dup(supported_policies || [])
  }
end