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
Returns the value of attribute skippable.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
-
#initialize(symbol_word, skippable: false) ⇒ Key
constructor
A new instance of Key.
- #to_s ⇒ Object
Constructor Details
#initialize(symbol_word, skippable: false) ⇒ Key
Returns a new instance of Key.
39 40 41 42 43 44 45 46 47 |
# File 'lib/fusuma/config/index.rb', line 39 def initialize(symbol_word, skippable: false) @symbol = begin symbol_word.to_sym rescue symbol_word end @skippable = skippable end |
Instance Attribute Details
#skippable ⇒ Object (readonly)
Returns the value of attribute skippable.
57 58 59 |
# File 'lib/fusuma/config/index.rb', line 57 def skippable @skippable end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
57 58 59 |
# File 'lib/fusuma/config/index.rb', line 57 def symbol @symbol end |
Instance Method Details
#to_s ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/fusuma/config/index.rb', line 49 def to_s if @skippable "#{@symbol}(skippable)" else @symbol.to_s end end |