Class: Lapis::Minecraft::Versioning::Rule
- Inherits:
-
Object
- Object
- Lapis::Minecraft::Versioning::Rule
- Defined in:
- lib/lapis/minecraft/versioning/rule.rb
Overview
Description of how resources can be chosen.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#allowed? ⇒ Boolean
readonly
Indicates whether the resource should be included.
Instance Method Summary collapse
-
#==(other) ⇒ true, false
Compares one rule to another.
-
#initialize(is_allowed) ⇒ Rule
constructor
Creates a basic rule.
Constructor Details
#initialize(is_allowed) ⇒ Rule
Creates a basic rule.
16 17 18 |
# File 'lib/lapis/minecraft/versioning/rule.rb', line 16 def initialize(is_allowed) @is_allowed = !!is_allowed end |
Instance Attribute Details
#allowed? ⇒ Boolean (readonly)
Indicates whether the resource should be included.
10 11 12 |
# File 'lib/lapis/minecraft/versioning/rule.rb', line 10 def allowed? @is_allowed end |
Instance Method Details
#==(other) ⇒ true, false
Compares one rule to another.
24 25 26 |
# File 'lib/lapis/minecraft/versioning/rule.rb', line 24 def ==(other) other.allowed? == @is_allowed end |