Class: Bukkit::WorldType
- Inherits:
-
Object
- Object
- Bukkit::WorldType
- Defined in:
- lib/bukkit/world_type.rb,
lib/bukkit/world_type/flat.rb,
lib/bukkit/world_type/normal.rb,
lib/bukkit/world_type/amplified.rb,
lib/bukkit/world_type/version_1_1.rb,
lib/bukkit/world_type/large_biomes.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Amplified, Flat, LargeBiomes, Normal, Version11
Constant Summary collapse
- NORMAL =
Normal- FLAT =
Flat- VERSION_1_1 =
Version11- LARGE_BIOMES =
LargeBiomes- AMPLIFIED =
Amplified- BY_NAME =
{}
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #getName)
readonly
Returns the value of attribute name.
Class Method Summary collapse
- .by_name(name) ⇒ Object (also: getByName)
- .values ⇒ Object
Instance Method Summary collapse
-
#initialize(name = self.to_s.upcase) ⇒ WorldType
constructor
A new instance of WorldType.
Constructor Details
#initialize(name = self.to_s.upcase) ⇒ WorldType
Returns a new instance of WorldType.
19 20 21 22 |
# File 'lib/bukkit/world_type.rb', line 19 def initialize(name = self.to_s.upcase) @name = name self end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: getName
Returns the value of attribute name.
8 9 10 |
# File 'lib/bukkit/world_type.rb', line 8 def name @name end |
Class Method Details
.by_name(name) ⇒ Object Also known as: getByName
35 36 37 |
# File 'lib/bukkit/world_type.rb', line 35 def by_name(name) BY_NAME[name] end |
.values ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/bukkit/world_type.rb', line 25 def values [ NORMAL, FLAT, VERSION_1_1, LARGE_BIOMES, AMPLIFIED ] end |