<% class Main < Iowa::Component attr_reader :loggedTimes attr_accessor :logItem attr_accessor :comment, :oldComment def awake @loggedTimes = [] end def time Time.now end def log @loggedTimes << {"time" => time, "comment" => @comment} end def oldComments @loggedTimes.collect{|c| c["comment"]}.uniq.sort end def choose @comment = @oldComment end end %>

Hello world!

The current time is @time.

Add a comment: