Module: Rewrite::Prelude

Defined in:
lib/rewrite/prelude.rb,
lib/rewrite/prelude/try.rb,
lib/rewrite/prelude/andand.rb,
lib/rewrite/prelude/please.rb,
lib/rewrite/prelude/called_by_name.rb

Overview

Module containing standard rewriting features. For more information about each feature, go directly to the class, such as Andand or CalledByName. If you include Rewrite::Prelude, you get some methods as sugar. For a list of those methods, go to InstanceMethods. – TODO: Including the prelude should mean that all of these classes are processed by default, I shouldn’t

have to write them all out as instance methods

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Andand, CalledByName, Please, Try

Class Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object

:nodoc: all



46
47
48
49
# File 'lib/rewrite/prelude.rb', line 46

def self.included(receiver) #:nodoc: all
  receiver.extend         ClassMethods
  receiver.send :include, InstanceMethods
end