Class: Jekyll::Engine::Erb::LazyStruct
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Jekyll::Engine::Erb::LazyStruct
- Defined in:
- lib/jekyll/rendering.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ LazyStruct
constructor
A new instance of LazyStruct.
Constructor Details
#initialize(hash) ⇒ LazyStruct
Returns a new instance of LazyStruct.
155 156 157 158 159 160 |
# File 'lib/jekyll/rendering.rb', line 155 def initialize(hash) @table = Hash.new { |h, k| new_ostruct_member(k) h[k] = h.has_key?(s = k.to_s) ? h[s] : nil }.update(hash) end |