Created
July 21, 2016 11:11
-
-
Save daneb/883af89a5846a02a1f0c71df5db3d7d5 to your computer and use it in GitHub Desktop.
Jsender Extend vs Include
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'jsender' | |
module Hello | |
extend Jsender | |
def self.world | |
self.success('moo') | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'jsender' | |
module Hello | |
include Jsender | |
def self.world | |
success('moo') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why does the extend work, but not the include?
irb(main):022:0> Hello.world
NoMethodError: undefined method `success' for Jsender:Module