Class: TwitterCldr::Resources::ReadmeRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/twitter_cldr/resources/readme_renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ ReadmeRenderer

Returns a new instance of ReadmeRenderer.



17
18
19
20
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 17

def initialize(text)
  @text = text
  @assertion_failures = []
end

Instance Attribute Details

#assertion_failuresObject (readonly)

Returns the value of attribute assertion_failures.



15
16
17
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 15

def assertion_failures
  @assertion_failures
end

#textObject (readonly)

Returns the value of attribute text.



15
16
17
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 15

def text
  @text
end

Instance Method Details

#datetimeObject



26
27
28
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 26

def datetime
  @datetime ||= DateTime.new(2014, 2, 14, 12, 20, 5, 0)
end

#renderObject



22
23
24
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 22

def render
  ERB.new(text).result(binding)
end

#timeObject



30
31
32
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 30

def time
  @time ||= Time.gm(2014, 2, 14, 12, 20, 5, 0)
end