Class: Satis::Dialog::Component

Inherits:
ApplicationComponent show all
Defined in:
app/components/satis/dialog/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(title:, icon: nil) ⇒ Component

Returns a new instance of Component.



12
13
14
15
# File 'app/components/satis/dialog/component.rb', line 12

def initialize(title:, icon: nil)
  @title = title
  @icon = icon
end

Instance Attribute Details

#iconObject (readonly)

Returns the value of attribute icon.



11
12
13
# File 'app/components/satis/dialog/component.rb', line 11

def icon
  @icon
end

#titleObject (readonly)

Returns the value of attribute title.



11
12
13
# File 'app/components/satis/dialog/component.rb', line 11

def title
  @title
end

Instance Method Details

#icon?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/components/satis/dialog/component.rb', line 17

def icon?
  icon.present?
end