Class: Card::Mod::LoadStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/card/mod/load_strategy.rb,
lib/card/mod/load_strategy/eval.rb,
lib/card/mod/load_strategy/tmp_files.rb,
lib/card/mod/load_strategy/set_tmp_files.rb,
lib/card/mod/load_strategy/pattern_tmp_files.rb

Overview

Shared code for the three different load strategies: Eval, TmpFiles and BindingMagic

Direct Known Subclasses

BindingMagic, Eval, TmpFiles

Defined Under Namespace

Classes: Eval, PatternTmpFiles, SetTmpFiles, TmpFiles

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mod_dirs, loader) ⇒ LoadStrategy

Returns a new instance of LoadStrategy.



19
20
21
22
# File 'lib/card/mod/load_strategy.rb', line 19

def initialize mod_dirs, loader
  @mod_dirs = mod_dirs
  @loader = loader
end

Class Method Details

.klass(symbol) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/card/mod/load_strategy.rb', line 11

def self.klass symbol
  case symbol
  when :tmp_files     then TmpFiles
  when :binding_magic then BindingMagic
  else                     Eval
  end
end

Instance Method Details

#clean_comments?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/card/mod/load_strategy.rb', line 24

def clean_comments?
  false
end