Module: Card::Set::All::Bootstrap::Accordion::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/accordion.rb

Instance Method Summary collapse

Instance Method Details

#accordion(&block) ⇒ Object



9
10
11
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/accordion.rb', line 9

def accordion &block
  wrap_with :div, class: classy("accordion"), &block
end

#accordion_item(title, **args) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/accordion.rb', line 13

def accordion_item title, **args
  args.reverse_merge!(
    title: title,
    subheader: nil,
    data: nil,
    body: "",
    open: false,
    collapse_id: "card-#{card.name.safe_key}-#{args[:context]}-collapse-id"
  )
  haml :accordion_item, **args
end