Class: Preseason::Config::Templating
- Inherits:
-
Object
- Object
- Preseason::Config::Templating
show all
- Includes:
- Preseason::Config
- Defined in:
- lib/preseason/config/templating.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#ask, #readme, #yes?
#method_missing
Instance Attribute Details
#library ⇒ Object
Returns the value of attribute library.
6
7
8
|
# File 'lib/preseason/config/templating.rb', line 6
def library
@library
end
|
Instance Method Details
#ask_user ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/preseason/config/templating.rb', line 8
def ask_user
if yes? "Would you like to use Slim templating language? [y/n]"
self.library = :slim
elsif yes? "Would you like to use HAML instead? [y/n]"
self.library = :haml
end
end
|
#haml? ⇒ Boolean
20
21
22
|
# File 'lib/preseason/config/templating.rb', line 20
def haml?
library == :haml
end
|
#slim? ⇒ Boolean
16
17
18
|
# File 'lib/preseason/config/templating.rb', line 16
def slim?
library == :slim
end
|