Sha256: 079af60c9c0a46cf905ed2a004725030e4aa3a6a9bec7d10eca2a5b5ac5c424b
Contents?: true
Size: 375 Bytes
Versions: 36
Compression:
Stored size: 375 Bytes
Contents
module Schemacop::V2 class NodeWithBlock < Node class_attribute :block_methods self.block_methods = [].freeze def self.block_method(name) self.block_methods += [name] end def exec_block(&block) return unless block_given? se = Schemacop::ScopedEnv.new(self, self.class.block_methods) se.instance_exec(&block) end end end
Version data entries
36 entries across 36 versions & 1 rubygems