Sha256: d7d7f20f064bed7e9fd10f70a863a80f793ade9166162d021820523548642cc1
Contents?: true
Size: 561 Bytes
Versions: 11
Compression:
Stored size: 561 Bytes
Contents
# encoding: utf-8 module Nanoc::Extra::Checking class DSL attr_reader :deploy_checks def self.from_file(filename) dsl = self.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
11 entries across 11 versions & 1 rubygems