Class: Mirah::Transform::Transformer::JMetaPosition

Inherits:
Object
  • Object
show all
Defined in:
lib/mirah/transform/transformer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transformer, startpos, endpos, source) ⇒ JMetaPosition

Returns a new instance of JMetaPosition.



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/mirah/transform/transformer.rb', line 47

def initialize(transformer, startpos, endpos, source)
  @startpos = startpos
  @endpos = endpos
  @transformer = transformer
  @start_line = startpos.line
  @start_offset = startpos.pos
  @start_column = startpos.col
  @end_line = endpos.line
  @end_offset = endpos.pos
  @end_column = endpos.col
  @source = source
end

Instance Attribute Details

#end_columnObject

Returns the value of attribute end_column.



45
46
47
# File 'lib/mirah/transform/transformer.rb', line 45

def end_column
  @end_column
end

#end_lineObject

Returns the value of attribute end_line.



44
45
46
# File 'lib/mirah/transform/transformer.rb', line 44

def end_line
  @end_line
end

#end_offsetObject

Returns the value of attribute end_offset.



44
45
46
# File 'lib/mirah/transform/transformer.rb', line 44

def end_offset
  @end_offset
end

#endposObject

Returns the value of attribute endpos.



45
46
47
# File 'lib/mirah/transform/transformer.rb', line 45

def endpos
  @endpos
end

#fileObject

Returns the value of attribute file.



44
45
46
# File 'lib/mirah/transform/transformer.rb', line 44

def file
  @file
end

#sourceObject

Returns the value of attribute source.



45
46
47
# File 'lib/mirah/transform/transformer.rb', line 45

def source
  @source
end

#start_columnObject

Returns the value of attribute start_column.



45
46
47
# File 'lib/mirah/transform/transformer.rb', line 45

def start_column
  @start_column
end

#start_lineObject

Returns the value of attribute start_line.



44
45
46
# File 'lib/mirah/transform/transformer.rb', line 44

def start_line
  @start_line
end

#start_offsetObject

Returns the value of attribute start_offset.



44
45
46
# File 'lib/mirah/transform/transformer.rb', line 44

def start_offset
  @start_offset
end

#startposObject

Returns the value of attribute startpos.



45
46
47
# File 'lib/mirah/transform/transformer.rb', line 45

def startpos
  @startpos
end