Sha256: b180066032b041f6c9110316728ad8cce7f562ac857eae4d8c454dcabfeb3d1b
Contents?: true
Size: 629 Bytes
Versions: 4
Compression:
Stored size: 629 Bytes
Contents
# frozen_string_literal: true module Mutant class Subject class Config include Adamantium, Anima.new(:inline_disable) DEFAULT = new(inline_disable: false) DISABLE_REGEXP = /(\s|^)mutant:disable(?:\s|$)/.freeze SYNTAX_REGEXP = /\A(?:#|=begin\n)/.freeze def self.parse(comments) new( inline_disable: comments.any? { |comment| DISABLE_REGEXP.match?(comment_body(comment)) } ) end def self.comment_body(comment) comment.text.sub(SYNTAX_REGEXP, '') end private_class_method :comment_body end # Config end # Subject end # Mutant
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mutant-0.11.11 | lib/mutant/subject/config.rb |
mutant-0.11.10 | lib/mutant/subject/config.rb |
mutant-0.11.9 | lib/mutant/subject/config.rb |
mutant-0.11.8 | lib/mutant/subject/config.rb |