Class: HamlUserTags::LazyContents
- Inherits:
-
String
- Object
- String
- HamlUserTags::LazyContents
- Defined in:
- lib/haml_user_tags/helpers.rb
Instance Method Summary collapse
- #__getobj__ ⇒ Object
-
#initialize(&generator) ⇒ LazyContents
constructor
A new instance of LazyContents.
Constructor Details
#initialize(&generator) ⇒ LazyContents
Returns a new instance of LazyContents.
45 46 47 |
# File 'lib/haml_user_tags/helpers.rb', line 45 def initialize(&generator) @generator = generator end |
Instance Method Details
#__getobj__ ⇒ Object
49 50 51 52 53 54 |
# File 'lib/haml_user_tags/helpers.rb', line 49 def __getobj__ unless @results @results, @generator = @generator.call, nil end @results end |