Class: HakumiComponents::Transfer::Item
- Inherits:
-
Object
- Object
- HakumiComponents::Transfer::Item
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/transfer/item.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(key:, title:, description:, disabled:, class_name:) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(key:, title:, description:, disabled:, class_name:) ⇒ Item
Returns a new instance of Item.
18 19 20 21 22 23 24 |
# File 'app/components/hakumi_components/transfer/item.rb', line 18 def initialize(key:, title:, description:, disabled:, class_name:) @key = key @title = title @description = description @disabled = disabled @class_name = class_name end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
39 40 41 |
# File 'app/components/hakumi_components/transfer/item.rb', line 39 def class_name @class_name end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
33 34 35 |
# File 'app/components/hakumi_components/transfer/item.rb', line 33 def description @description end |
#disabled ⇒ Object (readonly)
Returns the value of attribute disabled.
36 37 38 |
# File 'app/components/hakumi_components/transfer/item.rb', line 36 def disabled @disabled end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
27 28 29 |
# File 'app/components/hakumi_components/transfer/item.rb', line 27 def key @key end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
30 31 32 |
# File 'app/components/hakumi_components/transfer/item.rb', line 30 def title @title end |
Instance Method Details
#[](key) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'app/components/hakumi_components/transfer/item.rb', line 42 def [](key) case key.to_sym when :key then @key when :title then @title when :description then @description when :disabled then @disabled when :class_name then @class_name else nil end end |