Class: Herb::ActionView::HelperOption
- Inherits:
-
Object
- Object
- Herb::ActionView::HelperOption
- Defined in:
- lib/herb/action_view/helper_registry.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
: String.
-
#maps_to ⇒ Object
readonly
: String?.
-
#name ⇒ Object
readonly
: String.
-
#type ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#initialize(name, type, maps_to, description) ⇒ HelperOption
constructor
: (String, String, String?, String) -> void.
-
#maps_to_aria_attribute? ⇒ Boolean
: () -> bool.
-
#maps_to_data_attribute? ⇒ Boolean
: () -> bool.
Constructor Details
#initialize(name, type, maps_to, description) ⇒ HelperOption
: (String, String, String?, String) -> void
533 534 535 536 537 538 |
# File 'lib/herb/action_view/helper_registry.rb', line 533 def initialize(name, type, maps_to, description) @name = name @type = type @maps_to = maps_to @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
: String
530 531 532 |
# File 'lib/herb/action_view/helper_registry.rb', line 530 def description @description end |
#maps_to ⇒ Object (readonly)
: String?
529 530 531 |
# File 'lib/herb/action_view/helper_registry.rb', line 529 def maps_to @maps_to end |
#name ⇒ Object (readonly)
: String
527 528 529 |
# File 'lib/herb/action_view/helper_registry.rb', line 527 def name @name end |
#type ⇒ Object (readonly)
: String
528 529 530 |
# File 'lib/herb/action_view/helper_registry.rb', line 528 def type @type end |
Instance Method Details
#maps_to_aria_attribute? ⇒ Boolean
: () -> bool
544 |
# File 'lib/herb/action_view/helper_registry.rb', line 544 def maps_to_aria_attribute? = maps_to&.start_with?("aria-") || false |
#maps_to_data_attribute? ⇒ Boolean
: () -> bool
541 |
# File 'lib/herb/action_view/helper_registry.rb', line 541 def maps_to_data_attribute? = maps_to&.start_with?("data-") || false |