Class: Codesake::Kernel
- Inherits:
-
Object
- Object
- Codesake::Kernel
- Includes:
- Singleton
- Defined in:
- lib/codesake/kernel.rb
Constant Summary collapse
- NONE =
0
- TEXT =
1
- JSP =
2
- UNKNOWN =
-1
Instance Attribute Summary collapse
-
#engine ⇒ Object
readonly
Returns the value of attribute engine.
Instance Method Summary collapse
Instance Attribute Details
#engine ⇒ Object (readonly)
Returns the value of attribute engine.
7 8 9 |
# File 'lib/codesake/kernel.rb', line 7 def engine @engine end |
Instance Method Details
#choose_engine(filename, options) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/codesake/kernel.rb', line 14 def choose_engine(filename, ) engine = nil case detect(filename) when TEXT engine = Codesake::Engine::Text.new(filename) when NONE engine = Codesake::Engine::Generic.new(filename) when JSP engine = Codesake::Engine::Jsp.new(filename, ) end engine end |