Class: Fusuma::Config::Index::Key
- Inherits:
-
Object
- Object
- Fusuma::Config::Index::Key
- Defined in:
- lib/fusuma/config/index.rb
Overview
Keys in Index
Instance Attribute Summary collapse
-
#skippable ⇒ Object
readonly
: bool.
-
#symbol ⇒ Object
readonly
: Symbol | Integer.
Instance Method Summary collapse
-
#initialize(symbol_word, skippable: false) ⇒ Key
constructor
: (String | Integer | Symbol, ?skippable: bool) -> void.
- #to_s ⇒ Object
Constructor Details
#initialize(symbol_word, skippable: false) ⇒ Key
: (String | Integer | Symbol, ?skippable: bool) -> void
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fusuma/config/index.rb', line 44 def initialize(symbol_word, skippable: false) @symbol = case symbol_word when Integer, Symbol symbol_word else symbol_word.to_sym end @skippable = skippable end |
Instance Attribute Details
#skippable ⇒ Object (readonly)
: bool
41 42 43 |
# File 'lib/fusuma/config/index.rb', line 41 def skippable @skippable end |
#symbol ⇒ Object (readonly)
: Symbol | Integer
40 41 42 |
# File 'lib/fusuma/config/index.rb', line 40 def symbol @symbol end |
Instance Method Details
#to_s ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/fusuma/config/index.rb', line 55 def to_s if @skippable "#{@symbol}(skippable)" else @symbol.to_s end end |