module Deck::Repeatable

Public Instance Methods

attributes() click to toggle source
# File lib/deck/repeatable.rb, line 18
def attributes
  @index ||= 0
  @repeatable_attr[@index]
end
next() click to toggle source
# File lib/deck/repeatable.rb, line 23
def next
  @index += 1
end
step(&block) click to toggle source
# File lib/deck/repeatable.rb, line 10
def step(&block)
  @repeatable_attr ||= []
  step = Step.new
  step.instance_eval(&block) if block_given?

  @repeatable_attr << step.attributes
end