class Monster

Attributes

boss[RW]
challenge[R]
key[R]
name[R]
source[R]
type[R]
xp_value[RW]

Public Class Methods

new( challenge, name, type, source ) click to toggle source
# File lib/monsters/monster.rb, line 19
def initialize( challenge, name, type, source )
  set_instance_variables(binding, *local_variables)
  @key = @name.gsub( /[ -]/, '_' ).gsub( 'é', 'e' ).delete( "()'’“”" ).downcase.to_sym
  @boss = false
end

Public Instance Methods

to_hash() click to toggle source
# File lib/monsters/monster.rb, line 25
def to_hash
  { key: @key, challenge: @challenge, name: @name, type: @type, source: @source, xp_value: @xp_value, boss: @boss }
end