Class: Twitter::Bootstrap::Components::V4::PortraitCard
- Defined in:
- app/components/twitter/bootstrap/components/v4/portrait_card.rb
Overview
Example:
.col-lg-4
= bootstrap_portrait_card(image_options: { src: "data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" }) do
%h2 Heading
%p Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.
%p
%a.btn.btn-secondary{:href => "#", :role => "button"} View details »
Instance Attribute Summary collapse
-
#image_options ⇒ Object
Returns the value of attribute image_options.
Instance Method Summary collapse
-
#initialize(*args) ⇒ PortraitCard
constructor
A new instance of PortraitCard.
Methods inherited from Base
Constructor Details
#initialize(*args) ⇒ PortraitCard
Returns a new instance of PortraitCard.
17 18 19 20 21 |
# File 'app/components/twitter/bootstrap/components/v4/portrait_card.rb', line 17 def initialize(*args) super @options.reverse_merge() @image_options = (@options.delete(:image_options) || {}).reverse_merge() end |
Instance Attribute Details
#image_options ⇒ Object
Returns the value of attribute image_options.
15 16 17 |
# File 'app/components/twitter/bootstrap/components/v4/portrait_card.rb', line 15 def @image_options end |