Class: VivlioStarter::CLI::ConfigKeys::Spec
- Inherits:
-
Data
- Object
- Data
- VivlioStarter::CLI::ConfigKeys::Spec
- Defined in:
- lib/vivlio_starter/cli/config_keys.rb
Overview
キー 1 件の宣言。ハッシュリテラルではなく Data を使うのは、打ち間違いを 即座に落とすため(Spec[defualt: 500] は ArgumentError だが { defualt: 500 } は静かに通り、既定値を持たないキーとして振る舞う)。
Instance Attribute Summary collapse
-
#authored ⇒ Object
readonly
Returns the value of attribute authored.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#retired ⇒ Object
readonly
Returns the value of attribute retired.
Instance Method Summary collapse
-
#authored? ⇒ Boolean
著者が埋めるキーか(値は未設定時に見せる記入例).
-
#initialize(default: nil, retired: nil, authored: nil) ⇒ Spec
constructor
A new instance of Spec.
-
#retired? ⇒ Boolean
廃止キーか(値は移行先の案内文).
Constructor Details
#initialize(default: nil, retired: nil, authored: nil) ⇒ Spec
Returns a new instance of Spec.
35 |
# File 'lib/vivlio_starter/cli/config_keys.rb', line 35 def initialize(default: nil, retired: nil, authored: nil) = super |
Instance Attribute Details
#authored ⇒ Object (readonly)
Returns the value of attribute authored
34 35 36 |
# File 'lib/vivlio_starter/cli/config_keys.rb', line 34 def @authored end |
#default ⇒ Object (readonly)
Returns the value of attribute default
34 35 36 |
# File 'lib/vivlio_starter/cli/config_keys.rb', line 34 def default @default end |
#retired ⇒ Object (readonly)
Returns the value of attribute retired
34 35 36 |
# File 'lib/vivlio_starter/cli/config_keys.rb', line 34 def retired @retired end |
Instance Method Details
#authored? ⇒ Boolean
著者が埋めるキーか(値は未設定時に見せる記入例)
41 |
# File 'lib/vivlio_starter/cli/config_keys.rb', line 41 def = !.nil? |
#retired? ⇒ Boolean
廃止キーか(値は移行先の案内文)
38 |
# File 'lib/vivlio_starter/cli/config_keys.rb', line 38 def retired? = !retired.nil? |