Class: FifthedSim::Spell::DefinitionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/fifthed_sim/spell.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ DefinitionProxy

Returns a new instance of DefinitionProxy.



8
9
10
11
12
13
# File 'lib/fifthed_sim/spell.rb', line 8

def initialize(name, &block)
  @hash = {
    name: name
  }
  instance_eval(&block)
end

Instance Method Details

#attrsObject



35
36
37
# File 'lib/fifthed_sim/spell.rb', line 35

def attrs
  @hash
end

#save_dc(n) ⇒ Object



27
28
29
# File 'lib/fifthed_sim/spell.rb', line 27

def save_dc(n)
  @hash[:save_dc] = n
end

#save_type(n) ⇒ Object



31
32
33
# File 'lib/fifthed_sim/spell.rb', line 31

def save_type(n)
  @hash[:save_type] = n
end