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.



32
33
34
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 32

def initialize parent
  @parent = parent
end

Instance Attribute Details

#body_contentObject (readonly)

Returns the value of attribute body_content.



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

def body_content
  @body_content
end

Returns the value of attribute footer_content.



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

def footer_content
  @footer_content
end

#parentObject (readonly)

Returns the value of attribute parent.



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

def parent
  @parent
end

Instance Method Details

#body(&block) ⇒ Object



36
37
38
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 36

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


40
41
42
# File 'lib/bootstrap-components-helpers/modal_helper.rb', line 40

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