Skip to content

Instantly share code, notes, and snippets.

@yoamomonstruos
Created October 27, 2012 12:07
Show Gist options
  • Save yoamomonstruos/3964435 to your computer and use it in GitHub Desktop.
Save yoamomonstruos/3964435 to your computer and use it in GitHub Desktop.
Playing with modules. Is it correct?
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