Module: Moon::Indexable

Included in:
SelectiveRenderArray
Defined in:
lib/moon/packages/render_primitives/indexable.rb

Overview

Mixin to achieve Indexable objects

Defined Under Namespace

Classes: IndexEvent

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#indexInteger


18
19
20
# File 'lib/moon/packages/render_primitives/indexable.rb', line 18

def index
  @index
end

Instance Method Details

#change_index(index) ⇒ Object


48
49
50
51
52
# File 'lib/moon/packages/render_primitives/indexable.rb', line 48

def change_index(index)
  pre_change_index
  set_index(treat_index(index))
  post_change_index
end

#set_index(index) ⇒ Object


43
44
45
# File 'lib/moon/packages/render_primitives/indexable.rb', line 43

def set_index(index)
  @index = index
end