Created
October 27, 2012 12:07
-
-
Save yoamomonstruos/3964435 to your computer and use it in GitHub Desktop.
Playing with modules. Is it correct?
This file contains 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 "sinatra/base" | |
module BoldTypes | |
module Authentication | |
def self.registered(app) | |
app.helpers BoldTypes::Helpers::Authentication | |
app.get "/" do | |
"#{testing}" | |
end | |
end | |
end | |
module Helpers | |
module Authentication | |
def testing | |
"Something Else" | |
end | |
end | |
end | |
class Application < Sinatra::Base | |
register BoldTypes::Authentication | |
end | |
end | |
BoldTypes::Application.run! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment