Class: SC2Cli::Shared::Names
- Inherits:
-
Object
- Object
- SC2Cli::Shared::Names
- Defined in:
- lib/sc2cli/shared/names.rb
Constant Summary collapse
- @@console =
Console.instance
- @@file =
"names.yaml"
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize(configuration:, name:) ⇒ Names
constructor
A new instance of Names.
Constructor Details
#initialize(configuration:, name:) ⇒ Names
Returns a new instance of Names.
39 40 41 42 43 44 45 46 |
# File 'lib/sc2cli/shared/names.rb', line 39 def initialize(configuration:, name:) @configuration = configuration @base = @configuration.base @path = File.join(@base, @@file) load(name: name) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
32 33 34 |
# File 'lib/sc2cli/shared/names.rb', line 32 def base @base end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
33 34 35 |
# File 'lib/sc2cli/shared/names.rb', line 33 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
34 35 36 |
# File 'lib/sc2cli/shared/names.rb', line 34 def name @name end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
35 36 37 |
# File 'lib/sc2cli/shared/names.rb', line 35 def region @region end |