Module: Ariadne::Behaviors::Captionable

Included in:
UI::Button::Component
Defined in:
app/components/ariadne/behaviors/captionable.rb

Instance Method Summary collapse

Instance Method Details

#with_caption(text, **options) ⇒ Object



6
7
8
9
10
# File 'app/components/ariadne/behaviors/captionable.rb', line 6

def with_caption(text, **options)
  @caption_id = ::Ariadne::ViewHelper.generate_id

  Ariadne::Behaviors::Caption.new(id: @caption_id, text: text, component: self, **options)
end