Class: TreeHaver::TreeHaverProfile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backend_refObject

Returns the value of attribute backend_ref

Returns:

  • (Object)

    the current value of backend_ref



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def backend_ref
  @backend_ref
end

#capabilityObject

Returns the value of attribute capability

Returns:

  • (Object)

    the current value of capability



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def capability
  @capability
end

#diagnosticsObject

Returns the value of attribute diagnostics

Returns:

  • (Object)

    the current value of diagnostics



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def diagnostics
  @diagnostics
end

#fixture_slicesObject

Returns the value of attribute fixture_slices

Returns:

  • (Object)

    the current value of fixture_slices



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def fixture_slices
  @fixture_slices
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def language
  @language
end

#node_rolesObject

Returns the value of attribute node_roles

Returns:

  • (Object)

    the current value of node_roles



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def node_roles
  @node_roles
end

#normalized_node_fieldsObject

Returns the value of attribute normalized_node_fields

Returns:

  • (Object)

    the current value of normalized_node_fields



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def normalized_node_fields
  @normalized_node_fields
end

#optional_node_featuresObject

Returns the value of attribute optional_node_features

Returns:

  • (Object)

    the current value of optional_node_features



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def optional_node_features
  @optional_node_features
end

#profile_idObject

Returns the value of attribute profile_id

Returns:

  • (Object)

    the current value of profile_id



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def profile_id
  @profile_id
end

#provider_idObject

Returns the value of attribute provider_id

Returns:

  • (Object)

    the current value of provider_id



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def provider_id
  @provider_id
end

#unsupported_defaultsObject

Returns the value of attribute unsupported_defaults

Returns:

  • (Object)

    the current value of unsupported_defaults



217
218
219
# File 'lib/tree_haver/contracts.rb', line 217

def unsupported_defaults
  @unsupported_defaults
end

Instance Method Details

#to_hObject



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/tree_haver/contracts.rb', line 231

def to_h
  {
    profile_id: profile_id,
    language: language,
    backend_ref: backend_ref.to_h,
    provider_id: provider_id,
    node_roles: node_roles || [],
    normalized_node_fields: normalized_node_fields || [],
    optional_node_features: optional_node_features || [],
    unsupported_defaults: unsupported_defaults || {},
    capability: capability.to_h,
    fixture_slices: fixture_slices || [],
    diagnostics: diagnostics || []
  }
end