Class: Katalyst::Content::Node

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model
Defined in:
app/models/katalyst/content/node.rb

Overview

Data class for representing structural information about an item

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#itemObject

Returns the value of attribute item.



14
15
16
# File 'app/models/katalyst/content/node.rb', line 14

def item
  @item
end

Instance Method Details

#as_jsonObject



16
17
18
# File 'app/models/katalyst/content/node.rb', line 16

def as_json
  attributes.slice("id", "depth").as_json
end