Class: TreeHaver::ProcessStructureItem

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



348
349
350
# File 'lib/tree_haver/contracts.rb', line 348

def kind
  @kind
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



348
349
350
# File 'lib/tree_haver/contracts.rb', line 348

def name
  @name
end

#spanObject

Returns the value of attribute span

Returns:

  • (Object)

    the current value of span



348
349
350
# File 'lib/tree_haver/contracts.rb', line 348

def span
  @span
end

Instance Method Details

#to_hObject



349
350
351
352
353
354
355
# File 'lib/tree_haver/contracts.rb', line 349

def to_h
  {
    kind: kind,
    **(name ? { name: name } : {}),
    span: span.to_h
  }
end