Class: TwitterCldr::Resources::ReadmeRenderer
- Inherits:
-
Object
- Object
- TwitterCldr::Resources::ReadmeRenderer
- Defined in:
- lib/twitter_cldr/resources/readme_renderer.rb
Instance Attribute Summary collapse
-
#assertion_failures ⇒ Object
readonly
Returns the value of attribute assertion_failures.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #datetime ⇒ Object
-
#initialize(text) ⇒ ReadmeRenderer
constructor
A new instance of ReadmeRenderer.
- #render ⇒ Object
- #time ⇒ Object
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_failures ⇒ Object (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 |
#text ⇒ Object (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
#datetime ⇒ Object
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 |
#render ⇒ Object
22 23 24 |
# File 'lib/twitter_cldr/resources/readme_renderer.rb', line 22 def render ERB.new(text).result(binding) end |
#time ⇒ Object
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 |