Class: Temill::SourceFile::InsertionPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/temill/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(caller_loc, emitter_lineno, with_block, indent) ⇒ InsertionPoint

Returns a new instance of InsertionPoint.

Parameters:

  • caller_loc (Thread::Backtrace::Location)
  • emitter_lineno (Integer)

    line number after where to emit results

  • with_block (bool)

    whether called with block

  • indent (String)


287
288
289
290
291
292
293
294
# File 'lib/temill/core.rb', line 287

def initialize(caller_loc, emitter_lineno, with_block, indent)
  @caller_location = caller_loc
  @caller_lineno = caller_loc.lineno
  @emitter_lineno = emitter_lineno
  @with_block = with_block
  @indent = indent
  @results = []
end

Instance Attribute Details

#caller_linenoObject (readonly)

Returns the value of attribute caller_lineno.



279
280
281
# File 'lib/temill/core.rb', line 279

def caller_lineno
  @caller_lineno
end

#caller_locObject (readonly)

Returns the value of attribute caller_loc.



278
279
280
# File 'lib/temill/core.rb', line 278

def caller_loc
  @caller_loc
end

#emitter_linenoObject (readonly)

Returns the value of attribute emitter_lineno.



279
280
281
# File 'lib/temill/core.rb', line 279

def emitter_lineno
  @emitter_lineno
end

#indentObject (readonly)

Returns the value of attribute indent.



280
281
282
# File 'lib/temill/core.rb', line 280

def indent
  @indent
end

#resultsObject (readonly)

Returns the value of attribute results.



281
282
283
# File 'lib/temill/core.rb', line 281

def results
  @results
end

Instance Method Details

#<<(result) ⇒ Object



296
297
298
# File 'lib/temill/core.rb', line 296

def <<(result)
  @results << result
end