Module: Swizzle::ClassMethods

Included in:
Swizzle
Defined in:
lib/swizzle.rb

Constant Summary collapse

DEFAULT_SWIZZLE_PREFIX =
"swizzle_"

Instance Method Summary collapse

Instance Method Details

#swizzle!Object



21
22
23
24
25
26
# File 'lib/swizzle.rb', line 21

def swizzle!
  swizzle_class_methods!
  swizzle_instance_methods!

  @swizzled = true
end

#swizzled?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/swizzle.rb', line 17

def swizzled?
  @swizzled ||= false
end

#swizzled_class_methodsObject



9
10
11
# File 'lib/swizzle.rb', line 9

def swizzled_class_methods
  @swizzled_class_methods ||= {}
end

#swizzled_instance_methodsObject



13
14
15
# File 'lib/swizzle.rb', line 13

def swizzled_instance_methods
  @swizzled_instance_methods ||= {}
end