Class: HakumiComponents::Concerns::FormFieldContract
- Inherits:
-
Object
- Object
- HakumiComponents::Concerns::FormFieldContract
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/concerns/form_field_contract.rb
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#standalone ⇒ Object
readonly
Returns the value of attribute standalone.
Instance Method Summary collapse
-
#initialize(name:, label:, caption:, errors:, standalone:, required:, html_options:, rules:) ⇒ FormFieldContract
constructor
A new instance of FormFieldContract.
Constructor Details
#initialize(name:, label:, caption:, errors:, standalone:, required:, html_options:, rules:) ⇒ FormFieldContract
Returns a new instance of FormFieldContract.
21 22 23 24 25 26 27 28 29 30 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 21 def initialize(name:, label:, caption:, errors:, standalone:, required:, html_options:, rules:) @name = name @label = label @caption = caption @errors = errors @standalone = standalone @required = required @html_options = @rules = rules end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
39 40 41 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 39 def caption @caption end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
42 43 44 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 42 def errors @errors end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
51 52 53 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 51 def @html_options end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
36 37 38 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 36 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 33 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
48 49 50 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 48 def required @required end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
54 55 56 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 54 def rules @rules end |
#standalone ⇒ Object (readonly)
Returns the value of attribute standalone.
45 46 47 |
# File 'app/components/hakumi_components/concerns/form_field_contract.rb', line 45 def standalone @standalone end |