Class: Cardio::Mod::Loader::SetPatternTemplate

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



30
31
32
# File 'card/lib/cardio/mod/loader/set_pattern_loader.rb', line 30

def offset
  -5
end

#to_constObject



21
22
23
24
25
26
27
# File 'card/lib/cardio/mod/loader/set_pattern_loader.rb', line 21

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