Class: Lich::Gemstone::SpecialAbility

Inherits:
Object
  • Object
show all
Defined in:
documented/gemstone/creature.rb

Overview

Represents a special ability of a creature. This class holds the name and note of the ability.

Examples:

Creating a special ability

ability = Lich::Gemstone::SpecialAbility.new(name: "Fireball", note: "A powerful fire spell.")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SpecialAbility

Returns a new instance of SpecialAbility.



655
656
657
658
# File 'documented/gemstone/creature.rb', line 655

def initialize(data)
  @name = data[:name]
  @note = data[:note]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



653
654
655
# File 'documented/gemstone/creature.rb', line 653

def name
  @name
end

#noteObject

Returns the value of attribute note.



653
654
655
# File 'documented/gemstone/creature.rb', line 653

def note
  @note
end