Class: PhlexUI::Command::Item

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/command/item.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(value:, text: "", href: "#", **attrs) ⇒ Item

Returns a new instance of Item.



5
6
7
8
9
10
# File 'lib/phlex_ui/command/item.rb', line 5

def initialize(value:, text: "", href: "#", **attrs)
  @value = value
  @text = text
  @href = href
  super(**attrs)
end

Instance Method Details

#view_templateObject



12
13
14
# File 'lib/phlex_ui/command/item.rb', line 12

def view_template(&)
  a(**attrs, &)
end