Class: Enumerable::LoopMeta

Inherits:
Object
  • Object
show all
Defined in:
lib/html/template.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(total) ⇒ LoopMeta

Returns a new instance of LoopMeta.



13
14
15
# File 'lib/html/template.rb', line 13

def initialize( total )
  @total = total
end

Instance Attribute Details

#counterObject (readonly) Also known as: __counter__, __COUNTER__

Returns the value of attribute counter.



49
50
51
# File 'lib/html/template.rb', line 49

def counter
  @counter
end

#evenObject (readonly) Also known as: even?, __even__, __EVEN__

Returns the value of attribute even.



51
52
53
# File 'lib/html/template.rb', line 51

def even
  @even
end

#firstObject (readonly) Also known as: first?, __first__, __FIRST__

Returns the value of attribute first.



52
53
54
# File 'lib/html/template.rb', line 52

def first
  @first
end

#indexObject Also known as: __index__, __INDEX__

Returns the value of attribute index.



48
49
50
# File 'lib/html/template.rb', line 48

def index
  @index
end

#innerObject (readonly) Also known as: inner?, __inner__, __INNER__

Returns the value of attribute inner.



53
54
55
# File 'lib/html/template.rb', line 53

def inner
  @inner
end

#lastObject (readonly) Also known as: last?, __last__, __LAST__

Returns the value of attribute last.



55
56
57
# File 'lib/html/template.rb', line 55

def last
  @last
end

#oddObject (readonly) Also known as: odd?, __odd__, __ODD__

Returns the value of attribute odd.



50
51
52
# File 'lib/html/template.rb', line 50

def odd
  @odd
end

#outerObject (readonly) Also known as: outer?, __outer__, __OUTER__

Returns the value of attribute outer.



54
55
56
# File 'lib/html/template.rb', line 54

def outer
  @outer
end