Class: HakumiComponents::Table::EllipsisConfig::TooltipConfig

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

Constant Summary collapse

TooltipTitle =
T.type_alias { T.nilable(T.any(String, Proc)) }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, options:) ⇒ TooltipConfig

Returns a new instance of TooltipConfig.



29
30
31
32
# File 'app/components/hakumi_components/table/ellipsis_config.rb', line 29

def initialize(title:, options:)
  @title = T.let(title, TooltipTitle)
  @options = T.let(options, InputHash)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



38
39
40
# File 'app/components/hakumi_components/table/ellipsis_config.rb', line 38

def options
  @options
end

#titleObject (readonly)

Returns the value of attribute title.



35
36
37
# File 'app/components/hakumi_components/table/ellipsis_config.rb', line 35

def title
  @title
end

Instance Method Details

#to_hObject



41
42
43
# File 'app/components/hakumi_components/table/ellipsis_config.rb', line 41

def to_h
  @options.merge(title: @title).compact
end