Class: Distillery::Release

Inherits:
Object
  • Object
show all
Defined in:
lib/distillery/game/release.rb

Overview

Information about release

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, region:) ⇒ Release

Create a new instance of Release.

Parameters:

  • name (String)

    release name

  • region (String)

    region of release



24
25
26
27
28
29
# File 'lib/distillery/game/release.rb', line 24

def initialize(name, region:)
    @name   = name
    @region = region
    
    @@regions.add(region)
end

Instance Attribute Details

#nameString (readonly)

Release name

Returns:

  • (String)


33
34
35
# File 'lib/distillery/game/release.rb', line 33

def name
  @name
end

#regionString (readonly)

Region of release

Returns:

  • (String)


37
38
39
# File 'lib/distillery/game/release.rb', line 37

def region
  @region
end

Class Method Details

.regionsSet<String>

List all assigned region code.

Returns:

  • (Set<String>)

    set of region code



15
16
17
# File 'lib/distillery/game/release.rb', line 15

def self.regions
    @@regions
end