Module: NfgUi::Components::Utilities::Methodable

Included in:
Elements::Button, Elements::DropdownItem, Elements::NavLink
Defined in:
lib/nfg_ui/components/utilities/methodable.rb

Overview

Allows components to be setup to accept method: options

Instance Method Summary collapse

Instance Method Details

#dataObject



12
13
14
# File 'lib/nfg_ui/components/utilities/methodable.rb', line 12

def data
  send(:method) ? super.merge!(method: send(:method)) : super
end

#methodObject



8
9
10
# File 'lib/nfg_ui/components/utilities/methodable.rb', line 8

def method
  options.fetch(:method, nil)
end