Class: SublimeDSL::Tools::BlankSlate

Inherits:
Object
  • Object
show all
Defined in:
lib/sublime_dsl/tools/blank_slate.rb

Overview

A class with a minimal set of methods, used for DSL readers that heavily rely on #method_missing.

Constant Summary collapse

KEPT_METHODS =

Methods kept:

  • public/protected from BasicObject, except operators

  • private from BasicObject

  • a few Object/Kernel methods

%w(
  __id__
  __send__
  equal?
  instance_eval
  instance_exec

  initialize
  method_missing
  singleton_method_added
  singleton_method_removed
  singleton_method_undefined

  __callee__
  __method__
  caller
  define_singleton_method
  method
  object_id
  p
  puts
  raise
  singleton_methods
  warn
).map(&:to_sym)