Class: Spina::Forms::LabelComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Spina::Forms::LabelComponent
- Defined in:
- app/components/spina/forms/label_component.rb
Instance Attribute Summary collapse
-
#f ⇒ Object
readonly
Returns the value of attribute f.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(f, method) ⇒ LabelComponent
constructor
A new instance of LabelComponent.
Constructor Details
#initialize(f, method) ⇒ LabelComponent
Returns a new instance of LabelComponent.
6 7 8 9 |
# File 'app/components/spina/forms/label_component.rb', line 6 def initialize(f, method) @f = f @method = method end |
Instance Attribute Details
#f ⇒ Object (readonly)
Returns the value of attribute f.
4 5 6 |
# File 'app/components/spina/forms/label_component.rb', line 4 def f @f end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'app/components/spina/forms/label_component.rb', line 4 def method @method end |
Instance Method Details
#call ⇒ Object
11 12 13 |
# File 'app/components/spina/forms/label_component.rb', line 11 def call f.label method, class: "font-medium text-sm text-gray-700 block" end |