Class: Jekyll::Fridge::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-fridge.rb

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ Model

Returns a new instance of Model.



167
168
169
# File 'lib/jekyll-fridge.rb', line 167

def initialize(model)
  @model = model
end

Instance Method Details

#inspectObject



171
172
173
# File 'lib/jekyll-fridge.rb', line 171

def inspect
  @data
end

#to_liquidObject



175
176
177
# File 'lib/jekyll-fridge.rb', line 175

def to_liquid
  @data ||= Jekyll::Fridge.stringify_keys_deep(@model.attrs)
end