Class: Ape::SamplesContext
- Inherits:
-
Erubis::Context
- Object
- Erubis::Context
- Ape::SamplesContext
- Defined in:
- lib/ape/samples.rb
Instance Method Summary collapse
Instance Method Details
#id ⇒ Object
13 14 15 16 17 |
# File 'lib/ape/samples.rb', line 13 def id id = '' 5.times { id += rand(1000000).to_s } "tag:tbray.org,2005:#{id}" end |
#now ⇒ Object
10 11 12 |
# File 'lib/ape/samples.rb', line 10 def now DateTime::now.strftime("%Y-%m-%dT%H:%M:%S%z").sub(/(..)$/, ':\1') end |