Method: Aureus::Components::Box#render

Defined in:
lib/aureus/components/box.rb

#renderObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/aureus/components/box.rb', line 27

def render
  title = ('h3',compact(('span', @title),compact_render(*@buttons)))
  classes = ['box']
  classes << 'centered' if @options[:centered]
  @content = @new_content if !@new_content.nil?
   'div', class: classes.join(' ') do
    case @options[:for]
      when :form
        @content = ('ul', @content, class: 'content')
    end
    footer = @foot.nil? ? '' : ('div', @foot, class: 'foot')
    compact title, ('div', @content), footer
  end
end