Class: BootstrapComponentsHelpers::ModalHelper::ModalBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/bootstrap-components-helpers/modal_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ ModalBuilder

Returns a new instance of ModalBuilder.



26
27
28
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 26

def initialize parent
  @parent = parent
end

Instance Attribute Details

#body_contentObject (readonly)

Returns the value of attribute body_content.



23
24
25
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 23

def body_content
  @body_content
end

Returns the value of attribute footer_content.



23
24
25
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 23

def footer_content
  @footer_content
end

#parentObject (readonly)

Returns the value of attribute parent.



23
24
25
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 23

def parent
  @parent
end

Instance Method Details

#body(&block) ⇒ Object



30
31
32
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 30

def body &block
  @body_content = capture(&block)
end


34
35
36
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 34

def footer &block
  @footer_content = capture(&block)
end