Class: TreeHaver::SourceSpan

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_pointObject

Returns the value of attribute end_point

Returns:

  • (Object)

    the current value of end_point



130
131
132
# File 'lib/tree_haver/contracts.rb', line 130

def end_point
  @end_point
end

#rangeObject

Returns the value of attribute range

Returns:

  • (Object)

    the current value of range



130
131
132
# File 'lib/tree_haver/contracts.rb', line 130

def range
  @range
end

#start_pointObject

Returns the value of attribute start_point

Returns:

  • (Object)

    the current value of start_point



130
131
132
# File 'lib/tree_haver/contracts.rb', line 130

def start_point
  @start_point
end

Instance Method Details

#to_hObject



131
132
133
134
135
136
137
# File 'lib/tree_haver/contracts.rb', line 131

def to_h
  {
    range: range.to_h,
    start_point: start_point.to_h,
    end_point: end_point.to_h
  }
end