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.



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

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

Instance Method Details

#column(name, *options) ⇒ Object



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

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

#lanes(name, options) ⇒ Object



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

def lanes(name, options)
end

#row(name, *options) ⇒ Object



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

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