module Copyable::DeclarationStubber
Public Class Methods
included(klass)
click to toggle source
This creates dummy methods for each declaration, which is useful if you are creating a class that merely wants to check that a particular declaration is called correctly. It’s useful to have the other declarations that you don’t care about available as stubs.
# File lib/copyable/syntax_checking/declaration_stubber.rb, line 9 def self.included(klass) Declarations::ALL.each do |decl| klass.send(:define_method, decl.method_name) do |*args| # intentionally empty end end end