Class: TreeHaver::SourceFragment

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#availableObject

Returns the value of attribute available

Returns:

  • (Object)

    the current value of available



580
581
582
# File 'lib/tree_haver/contracts.rb', line 580

def available
  @available
end

#byte_lengthObject

Returns the value of attribute byte_length

Returns:

  • (Object)

    the current value of byte_length



580
581
582
# File 'lib/tree_haver/contracts.rb', line 580

def byte_length
  @byte_length
end

#diagnosticsObject

Returns the value of attribute diagnostics

Returns:

  • (Object)

    the current value of diagnostics



580
581
582
# File 'lib/tree_haver/contracts.rb', line 580

def diagnostics
  @diagnostics
end

#spanObject

Returns the value of attribute span

Returns:

  • (Object)

    the current value of span



580
581
582
# File 'lib/tree_haver/contracts.rb', line 580

def span
  @span
end

#strategyObject

Returns the value of attribute strategy

Returns:

  • (Object)

    the current value of strategy



580
581
582
# File 'lib/tree_haver/contracts.rb', line 580

def strategy
  @strategy
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



580
581
582
# File 'lib/tree_haver/contracts.rb', line 580

def text
  @text
end

Instance Method Details

#to_hObject



581
582
583
584
585
586
587
588
589
590
# File 'lib/tree_haver/contracts.rb', line 581

def to_h
  {
    text: text,
    span: span.to_h,
    available: available,
    strategy: strategy,
    byte_length: byte_length,
    diagnostics: diagnostics
  }
end