Class: PhlexUI::Pagination::Item

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

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(href: "#", active: false, **attrs) ⇒ Item

Returns a new instance of Item.



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

def initialize(href: "#", active: false, **attrs)
  @href = href
  @active = active
  super(**attrs)
end

Instance Method Details

#view_template(&block) ⇒ Object



11
12
13
14
15
# File 'lib/phlex_ui/pagination/item.rb', line 11

def view_template(&block)
  li do
    a(href: @href, **attrs, &block)
  end
end