free_mutant/lib/mutant/context.rb

47 lines
765 B
Ruby
Raw Normal View History

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