Class: Card::Mod::Loader::SetPatternLoader::Template

Inherits:
ModuleTemplate show all
Defined in:
lib/card/mod/loader/set_pattern_loader.rb

Instance Method Summary collapse

Methods inherited from ModuleTemplate

#build, #initialize, #simple_load?, #to_s

Constructor Details

This class inherits a constructor from Card::Mod::ModuleTemplate

Instance Method Details

#offsetObject

correct line number for error messages



25
26
27
# File 'lib/card/mod/loader/set_pattern_loader.rb', line 25

def offset
  -6
end

#to_constObject



17
18
19
20
21
22
# File 'lib/card/mod/loader/set_pattern_loader.rb', line 17

def to_const
  return Object if simple_load?
  Card::Set.const_get_or_set(@pattern.camelize) do
    Class.new(Card::Set::Pattern::Abstract)
  end
end