Sha256: 595a5ab9690691b88f601178e6885abbfc77777852b41c8e90d16541f22f1ed6
Contents?: true
Size: 550 Bytes
Versions: 12
Compression:
Stored size: 550 Bytes
Contents
module Nanoc::Extra::Checking # @api private class DSL attr_reader :deploy_checks def self.from_file(filename) dsl = new dsl.instance_eval File.read(filename) dsl end def initialize @deploy_checks = [] end def check(identifier, &block) klass = Class.new(::Nanoc::Extra::Checking::Check) klass.send(:define_method, :run, &block) klass.send(:identifier, identifier) end def deploy_check(*identifiers) identifiers.each { |i| @deploy_checks << i } end end end
Version data entries
12 entries across 12 versions & 1 rubygems