Class: Satis::ColorPicker::Component

Inherits:
ApplicationComponent show all
Defined in:
app/components/satis/color_picker/component.rb

Instance Attribute Summary collapse

Attributes inherited from ApplicationComponent

#original_view_context

Instance Method Summary collapse

Methods inherited from ApplicationComponent

add_helper, #component_name

Constructor Details

#initialize(attribute:, form: nil, css_variable: nil, css_scope: ":root") ⇒ Component

rubocop:disable Lint/MissingSuper



8
9
10
11
12
13
# File 'app/components/satis/color_picker/component.rb', line 8

def initialize(attribute:, form: nil, css_variable: nil, css_scope: ":root") # rubocop:disable Lint/MissingSuper
  @form = form
  @attribute = attribute
  @css_variable = css_variable
  @css_scope = css_scope
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



6
7
8
# File 'app/components/satis/color_picker/component.rb', line 6

def attribute
  @attribute
end

#css_scopeObject (readonly)

Returns the value of attribute css_scope.



6
7
8
# File 'app/components/satis/color_picker/component.rb', line 6

def css_scope
  @css_scope
end

#css_variableObject (readonly)

Returns the value of attribute css_variable.



6
7
8
# File 'app/components/satis/color_picker/component.rb', line 6

def css_variable
  @css_variable
end

#formObject (readonly)

Returns the value of attribute form.



6
7
8
# File 'app/components/satis/color_picker/component.rb', line 6

def form
  @form
end