Class: SC2Cli::Shared::Names

Inherits:
Object
  • Object
show all
Defined in:
lib/sc2cli/shared/names.rb

Constant Summary collapse

@@console =
Console.instance
@@file =
"names.yaml"

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#baseObject (readonly)

Returns the value of attribute base.



32
33
34
# File 'lib/sc2cli/shared/names.rb', line 32

def base
  @base
end

#idObject (readonly)

Returns the value of attribute id.



33
34
35
# File 'lib/sc2cli/shared/names.rb', line 33

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



34
35
36
# File 'lib/sc2cli/shared/names.rb', line 34

def name
  @name
end

#regionObject (readonly)

Returns the value of attribute region.



35
36
37
# File 'lib/sc2cli/shared/names.rb', line 35

def region
  @region
end