Class: Lapis::Minecraft::Versioning::Library
- Inherits:
-
Object
- Object
- Lapis::Minecraft::Versioning::Library
- Defined in:
- lib/lapis/minecraft/versioning/library.rb
Overview
Dependency needed to run Minecraft.
Instance Attribute Summary collapse
-
#exclude_paths ⇒ Array<String>
readonly
Paths to ignore when extracting resources.
-
#name ⇒ String
readonly
Name of the dependency.
-
#resources ⇒ ResourceSet
readonly
Set of resources included in the library.
-
#rules ⇒ Array<Rule>
readonly
Filter for which files should be installed.
Instance Method Summary collapse
-
#==(other) ⇒ true, false
Compares one library to another.
-
#initialize(name, resources, rules = [], exclude_paths = []) ⇒ Library
constructor
Creates information about a dependency.
Constructor Details
#initialize(name, resources, rules = [], exclude_paths = []) ⇒ Library
Creates information about a dependency.
29 30 31 32 33 34 |
# File 'lib/lapis/minecraft/versioning/library.rb', line 29 def initialize(name, resources, rules = [], exclude_paths = []) @name = name.dup.freeze @resources = resources @rules = rules.dup.freeze @exclude_paths = exclude_paths.map(&:freeze).freeze end |
Instance Attribute Details
#exclude_paths ⇒ Array<String> (readonly)
Paths to ignore when extracting resources.
22 23 24 |
# File 'lib/lapis/minecraft/versioning/library.rb', line 22 def exclude_paths @exclude_paths end |
#name ⇒ String (readonly)
Name of the dependency.
10 11 12 |
# File 'lib/lapis/minecraft/versioning/library.rb', line 10 def name @name end |
#resources ⇒ ResourceSet (readonly)
Set of resources included in the library.
14 15 16 |
# File 'lib/lapis/minecraft/versioning/library.rb', line 14 def resources @resources end |
#rules ⇒ Array<Rule> (readonly)
Filter for which files should be installed.
18 19 20 |
# File 'lib/lapis/minecraft/versioning/library.rb', line 18 def rules @rules end |
Instance Method Details
#==(other) ⇒ true, false
Compares one library to another.
40 41 42 43 44 45 |
# File 'lib/lapis/minecraft/versioning/library.rb', line 40 def ==(other) other.name == @name && other.resources == @resources && other.rules == @rules && other.exclude_paths == @exclude_paths end |