Sha256: b9664dce1dcbd885588af5515699199822582e2b6b296f2ffa2338588dcbc5ae

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

<html>
	<head>
		<title>HelloWorld Component Template</title>
	</head>

	<body>
		<pre>
class HelloWorld &lt; Iowa::Component

	attr_accessor :number
	
	def timeframe
		now = Time.now.hour
		case
		when now &gt; 20, now &lt; 5
			"night"
		when now &gt; 17
			"evening"
		when now &gt; 11
			"afternoon"
		else
			"morning"
		end
	end

	def current_time
		Time.now.asctime
	end

	def lucky_numbers
		r = []
		until r.length == 8
			n = rand(32)
			r &lt;&lt; n unless r.include? n
		end
		r
	end
end
		</pre>
	</body>
</html>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
IOWA-1.0.3 examples/hello_world/htdocs/hello_world_ruby.html
IOWA-1.0.2 examples/hello_world/htdocs/hello_world_ruby.html
IOWA-1.0.0 examples/hello_world/htdocs/hello_world_ruby.html