Class: Cardio::Mod::Loader::SetPatternLoader::Template

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

Instance Method Summary collapse

Methods inherited from ModuleTemplate

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

Constructor Details

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

Instance Method Details

#offsetObject

correct line number for error messages



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

def offset
  -5
end

#to_constObject



17
18
19
20
21
22
23
# File 'card/lib/cardio/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::Base)
  end
end