Created
May 13, 2011 20:33
-
-
Save gnrlbzik/971263 to your computer and use it in GitHub Desktop.
ruby method issue
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
# webrick.rb | |
require 'webrick' | |
WEBrick::HTTPUtils::DefaultMimeTypes['rhtml'] = 'text/html' | |
server = WEBrick::HTTPServer.new :Port => 3000, :DocumentRoot => Dir.pwd | |
trap 'INT' do server.shutdown end | |
server.start | |
# .rhtml - does not work | |
<%= | |
def broom | |
return '3' | |
end | |
p broom | |
%> | |
# command line | |
def broom | |
return '3' | |
end | |
puts broom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment