Rubyology

Rubyology 35: Screencast - Ruby WebServer 3


Listen Later

ERB (Embedded Ruby)! This addition to our Ruby web server application allows you to call web pages with Ruby code that execute on the fly (time of render). Check out these snippets: myfile = IO.readlines("chris.html") #@session.puts myfile template = ERB.new <<-EOF #{myfile} EOF @session.puts template.result(binding)
...more
View all episodesView all episodes
Download on the App Store

RubyologyBy Chris Matthieu