Class: Bukkit::Art

Inherits:
Object
  • Object
show all
Defined in:
lib/bukkit/art.rb,
lib/bukkit/art/sea.rb,
lib/bukkit/art/bomb.rb,
lib/bukkit/art/bust.rb,
lib/bukkit/art/pool.rb,
lib/bukkit/art/void.rb,
lib/bukkit/art/alban.rb,
lib/bukkit/art/aztec.rb,
lib/bukkit/art/kebab.rb,
lib/bukkit/art/match.rb,
lib/bukkit/art/plant.rb,
lib/bukkit/art/stage.rb,
lib/bukkit/art/aztec2.rb,
lib/bukkit/art/graham.rb,
lib/bukkit/art/sunset.rb,
lib/bukkit/art/wither.rb,
lib/bukkit/art/courbet.rb,
lib/bukkit/art/creebet.rb,
lib/bukkit/art/pointer.rb,
lib/bukkit/art/fighters.rb,
lib/bukkit/art/pigscene.rb,
lib/bukkit/art/skeleton.rb,
lib/bukkit/art/wanderer.rb,
lib/bukkit/art/wasteland.rb,
lib/bukkit/art/donkeykong.rb,
lib/bukkit/art/burningskull.rb,
lib/bukkit/art/skull_and_roses.rb

Overview

Represents the art on a painting

Defined Under Namespace

Classes: Alban, Aztec, Aztec2, Bomb, Burningskull, Bust, Courbet, Creebet, Donkeykong, Fighters, Graham, Kebab, Match, Pigscene, Plant, Pointer, Pool, Sea, Skeleton, SkullAndRoses, Stage, Sunset, Void, Wanderer, Wasteland, Wither

Constant Summary collapse

BY_NAME =
{}
BY_ID =
{}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, width, height) ⇒ Art

Returns a new instance of Art.



14
15
16
17
18
19
20
# File 'lib/bukkit/art.rb', line 14

def initialize(id, width, height)
  @id = id
  @width = width
  @height = height

  self
end

Instance Attribute Details

#heightInteger (readonly) Also known as: getBlockHeight

Gets the height of the painting, in blocks

Returns:

  • (Integer)

    The height of the painting, in blocks



33
34
35
# File 'lib/bukkit/art.rb', line 33

def height
  @height
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/bukkit/art.rb', line 10

def id
  @id
end

#widthInteger (readonly) Also known as: getBlockWidth

Gets the width of the painting, in blocks

Returns:

  • (Integer)

    The width of the painting, in blocks



25
26
27
# File 'lib/bukkit/art.rb', line 25

def width
  @width
end

Class Method Details

.by_name(name) ⇒ Object Also known as: getByName



70
71
72
73
74
75
# File 'lib/bukkit/art.rb', line 70

def by_name(name)
  if name
    name = name.to_s unless name.is_a? String
    BY_NAME[name.downcase]
  end
end

.valuesObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/bukkit/art.rb', line 39

def values
  [
    Bukkit::Art::Kebab,
    Bukkit::Art::Aztec,
    Bukkit::Art::Alban,
    Bukkit::Art::Aztec2,
    Bukkit::Art::Bomb,
    Bukkit::Art::Plant,
    Bukkit::Art::Wasteland,
    Bukkit::Art::Pool,
    Bukkit::Art::Courbet,
    Bukkit::Art::Sea,
    Bukkit::Art::Sunset,
    Bukkit::Art::Creebet,
    Bukkit::Art::Wanderer,
    Bukkit::Art::Graham,
    Bukkit::Art::Match,
    Bukkit::Art::Bust,
    Bukkit::Art::Stage,
    Bukkit::Art::Void,
    Bukkit::Art::SkullAndRoses,
    Bukkit::Art::Wither,
    Bukkit::Art::Fighters,
    Bukkit::Art::Pointer,
    Bukkit::Art::Pigscene,
    Bukkit::Art::Burningskull,
    Bukkit::Art::Skeleton,
    Bukkit::Art::Donkeykong
  ]
end