Use concord to cleanup mutation context
This commit is contained in:
parent
5569886223
commit
af51915ad9
1 changed files with 3 additions and 24 deletions
|
@ -1,26 +1,18 @@
|
|||
module Mutant
|
||||
# An abstract context where mutations can be appied to.
|
||||
class Context
|
||||
include Adamantium::Flat, AbstractType
|
||||
include Adamantium::Flat, AbstractType, Concord::Public.new(:source_path)
|
||||
|
||||
# Return root ast node
|
||||
#
|
||||
# @param [Rubnius::AST::Node] node
|
||||
# @param [Parser::AST::Node] node
|
||||
#
|
||||
# @return [Rubinis::AST::Node]
|
||||
# @return [Parser::AST::Node]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
abstract_method :root
|
||||
|
||||
# Return source path
|
||||
#
|
||||
# @return [String]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
attr_reader :source_path
|
||||
|
||||
# Return identification
|
||||
#
|
||||
# @return [String]
|
||||
|
@ -29,18 +21,5 @@ module Mutant
|
|||
#
|
||||
abstract_method :identification
|
||||
|
||||
private
|
||||
|
||||
# Initialize context
|
||||
#
|
||||
# @param [String] source_path
|
||||
#
|
||||
# @return [undefined]
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def initialize(source_path)
|
||||
@source_path = source_path
|
||||
end
|
||||
end # Context
|
||||
end # Mutant
|
||||
|
|
Loading…
Add table
Reference in a new issue