2012-07-26 19:25:23 +02:00
|
|
|
module Mutant
|
|
|
|
# An abstract context where mutations can be appied to.
|
|
|
|
class Context
|
2012-11-26 11:30:00 +01:00
|
|
|
include Adamantium::Flat, AbstractType
|
2012-07-26 19:25:23 +02:00
|
|
|
|
2012-08-16 04:10:54 +02:00
|
|
|
# Return root ast node
|
2012-07-26 19:25:23 +02:00
|
|
|
#
|
2013-01-13 22:26:31 +01:00
|
|
|
# @param [Rubnius::AST::Node] node
|
|
|
|
#
|
|
|
|
# @return [Rubinis::AST::Node]
|
2012-07-26 19:25:23 +02:00
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2012-08-03 01:28:15 +02:00
|
|
|
abstract_method :root
|
2012-08-14 12:26:56 +02:00
|
|
|
|
2012-08-16 04:10:54 +02:00
|
|
|
# Return source path
|
|
|
|
#
|
|
|
|
# @return [String]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2012-10-26 11:24:29 +02:00
|
|
|
attr_reader :source_path
|
2012-08-16 04:10:54 +02:00
|
|
|
|
2013-01-13 22:27:03 +01:00
|
|
|
# Return identification
|
|
|
|
#
|
|
|
|
# @return [String]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
abstract_method :identification
|
|
|
|
|
2012-08-14 12:26:56 +02:00
|
|
|
private
|
|
|
|
|
|
|
|
# Initialize context
|
|
|
|
#
|
|
|
|
# @param [String] source_path
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def initialize(source_path)
|
|
|
|
@source_path = source_path
|
|
|
|
end
|
2012-07-26 19:25:23 +02:00
|
|
|
end
|
|
|
|
end
|