Class: Cards::CardWall::DefinitionContext

Inherits:
Object
  • Object
show all
Defined in:
lib/cards/card_wall.rb

Instance Method Summary collapse

Constructor Details

#initialize(wraps) ⇒ DefinitionContext

Returns a new instance of DefinitionContext.



71
72
73
74
# File 'lib/cards/card_wall.rb', line 71

def initialize(wraps)
  @this = wraps
  @i = 0
end

Instance Method Details

#column(name, *options) ⇒ Object



82
83
84
85
86
87
88
# File 'lib/cards/card_wall.rb', line 82

def column(name, *options)
  @this.add_handler(name, Layouts::ColumnLayout.new(*options)) do |name, row|
    c = Card.new(name)
    yield c, row if block_given?
    c
  end
end

#lanes(name, options) ⇒ Object



90
91
# File 'lib/cards/card_wall.rb', line 90

def lanes(name, options)
end

#row(name, *options) ⇒ Object



76
77
78
79
80
# File 'lib/cards/card_wall.rb', line 76

def row(name, *options)
  @this.add_handler(name, Layouts::RowLayout.new(*options)) do |name, row|
    Card.new(name)
  end
end