Class: HakumiComponents::Concerns::FormFieldContract

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/components/hakumi_components/concerns/form_field_contract.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = html_options
  @rules = rules
end

Instance Attribute Details

#captionObject (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

#errorsObject (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_optionsObject (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
  @html_options
end

#labelObject (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

#nameObject (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

#requiredObject (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

#rulesObject (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

#standaloneObject (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