Class: Lapis::Minecraft::Versioning::Detailed
- Defined in:
- lib/lapis/minecraft/versioning/detailed.rb
Overview
Additional information about a Minecraft version.
Instance Attribute Summary collapse
-
#asset_index ⇒ AssetIndex
readonly
Overview of assets included in this version.
-
#client_download ⇒ Resource?
readonly
Retrieves the client jar information for this version.
-
#downloads ⇒ Array<Resource>
readonly
List of downloads available for this version.
-
#launcher_properties ⇒ LauncherProperties
readonly
Information about how to start the client in a launcher.
-
#libraries ⇒ Array<Library>
readonly
List of libraries needed to run this version.
-
#server_download ⇒ Resource?
readonly
Retrieves the server jar information for this version.
Attributes inherited from Basic
Instance Method Summary collapse
-
#==(other) ⇒ true, false
Compares one version to another.
-
#initialize(basic_info, asset_index, downloads, libraries, launcher_properties) ⇒ Detailed
constructor
Creates version information.
Constructor Details
#initialize(basic_info, asset_index, downloads, libraries, launcher_properties) ⇒ Detailed
Creates version information.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 40 def initialize(basic_info, asset_index, downloads, libraries, launcher_properties) super(basic_info.id, basic_info.type, basic_info.time, basic_info.url) @asset_index = asset_index @downloads = downloads.dup.freeze @libraries = libraries.dup.freeze @launcher_properties = launcher_properties @client_download = downloads.find { |download| download.classifier == 'client' } @server_download = downloads.find { |download| download.classifier == 'server' } end |
Instance Attribute Details
#asset_index ⇒ AssetIndex (readonly)
Overview of assets included in this version.
12 13 14 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 12 def asset_index @asset_index end |
#client_download ⇒ Resource? (readonly)
Retrieves the client jar information for this version.
28 29 30 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 28 def client_download @client_download end |
#downloads ⇒ Array<Resource> (readonly)
List of downloads available for this version.
16 17 18 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 16 def downloads @downloads end |
#launcher_properties ⇒ LauncherProperties (readonly)
Information about how to start the client in a launcher.
24 25 26 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 24 def launcher_properties @launcher_properties end |
#libraries ⇒ Array<Library> (readonly)
List of libraries needed to run this version.
20 21 22 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 20 def libraries @libraries end |
#server_download ⇒ Resource? (readonly)
Retrieves the server jar information for this version.
32 33 34 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 32 def server_download @server_download end |
Instance Method Details
#==(other) ⇒ true, false
Compares one version to another.
55 56 57 58 59 60 61 62 63 |
# File 'lib/lapis/minecraft/versioning/detailed.rb', line 55 def ==(other) super(other) && other.asset_index == @asset_index && other.downloads == @downloads && other.libraries == @libraries && other.launcher_properties == @launcher_properties && other.client_download == @client_download && other.server_download == @server_download end |