Class: Syaso::ListItem

Inherits:
Base
  • Object
show all
Defined in:
lib/syaso/list_item.rb

Instance Attribute Summary

Attributes inherited from Base

#content

Instance Method Summary collapse

Methods inherited from Base

#render

Constructor Details

#initialize(context, holder, content) ⇒ ListItem

Returns a new instance of ListItem.



6
7
8
9
10
# File 'lib/syaso/list_item.rb', line 6

def initialize(context, holder, content)
  super(context)
  self.holder = holder
  self.content = content
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Syaso::Base

Instance Method Details

#indexObject



12
13
14
# File 'lib/syaso/list_item.rb', line 12

def index
  self.holder.index(self.content)
end