Class: MatChip
- Inherits:
-
MaterialAngularIO::Component
- Object
- MaterialAngularIO::Component
- MatChip
- Defined in:
- lib/insite/examples/material_angular_io/components/mat_chip.rb
Direct Known Subclasses
Instance Method Summary collapse
- #disabled? ⇒ Boolean
- #label ⇒ Object
- #removable? ⇒ Boolean
- #remove ⇒ Object
- #selectable? ⇒ Boolean
- #selected? ⇒ Boolean
Instance Method Details
#disabled? ⇒ Boolean
6 7 8 |
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 6 def disabled? element(class: 'mat-chip-disabled').exist? end |
#label ⇒ Object
10 11 12 |
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 10 def label nokogiri.xpath('//text()')[0] end |
#removable? ⇒ Boolean
18 19 20 |
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 18 def removable? element(class: 'mat-chip-remove').exist? end |
#remove ⇒ Object
14 15 16 |
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 14 def remove element(class: 'mat-chip-remove').click end |
#selectable? ⇒ Boolean
26 27 28 |
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 26 def selectable? element(class: 'mat-chip-select').exist? end |
#selected? ⇒ Boolean
22 23 24 |
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 22 def selected? aria_selected == 'true' end |