Class: Twitter::Bootstrap::Components::V4::PortraitCard

Inherits:
Base
  • Object
show all
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

Instance Method Summary collapse

Methods inherited from Base

#perform

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(default_options)
  @image_options = (@options.delete(:image_options) || {}).reverse_merge(default_image_options)
end

Instance Attribute Details

#image_optionsObject

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
  @image_options
end