Skip to content

Instantly share code, notes, and snippets.

Said A uzbekjon

Block or report user

Report or block uzbekjon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@uzbekjon
uzbekjon / append_features.rb
Created May 16, 2015
Ruby "append_features" method demo
View append_features.rb
module MyModule
def self.append_features(base)
puts "IN 'append_features':"
puts " - BEFORE execution: #{base.instance_methods.include? :some_method}"
super
puts " - AFTER execution: #{base.instance_methods.include? :some_method}"
end
def self.included(base)
puts "IN 'included': #{base.instance_methods.include? :some_method}"
You can’t perform that action at this time.