Class: Manageable::Helpers::BoxBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/manageable/helpers/box_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ BoxBuilder

:nodoc:



9
10
11
12
# File 'lib/manageable/helpers/box_builder.rb', line 9

def initialize(parent)
  @parent = parent
  @buffers = { :block_header => '', :block_footer => '' }
end

Instance Attribute Details

#buffersObject (readonly)

:nodoc:



6
7
8
# File 'lib/manageable/helpers/box_builder.rb', line 6

def buffers
  @buffers
end

Instance Method Details

Sets the breadcrumbs to display in this box. See Activo::Rails::Helper#breadcrumbs.



27
28
29
30
# File 'lib/manageable/helpers/box_builder.rb', line 27

def breadcrumbs(options = {}, &block)
  buffers[:block_footer] << @parent.manageable_breadcrumbs(options, &block)
  ''
end

#controls(options = {}, &block) ⇒ Object

Sets the controls to display in this box. See Activo::Rails::Helper#controls.



15
16
17
18
# File 'lib/manageable/helpers/box_builder.rb', line 15

def controls(options = {}, &block)
  buffers[:block_header] << @parent.manageable_controls(options, &block)
  ''
end

Sets the navigation to display on this box. See Activo::Rails::Helper#navigation.



21
22
23
24
# File 'lib/manageable/helpers/box_builder.rb', line 21

def navigation(options = {}, &block)
  buffers[:block_header] << @parent.manageable_secondary_navigation(options, &block)
  ''
end