Class: JekyllGenerator::ThemeGeneratorBase
- Inherits:
-
RubiGen::Base
- Object
- RubiGen::Base
- JekyllGenerator::ThemeGeneratorBase
- Defined in:
- lib/jekyll_generator/theme_generator_base.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
-
#email ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
-
#github_user ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
-
#header_color ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
-
#hypenated_name ⇒ Object
readonly
Returns the value of attribute hypenated_name.
-
#name ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
-
#theme ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
-
#title ⇒ Object
readonly
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults.
Instance Method Summary collapse
-
#initialize(runtime_args, runtime_options = {}) ⇒ ThemeGeneratorBase
constructor
A new instance of ThemeGeneratorBase.
- #manifest ⇒ Object
Constructor Details
#initialize(runtime_args, runtime_options = {}) ⇒ ThemeGeneratorBase
Returns a new instance of ThemeGeneratorBase.
8 9 10 11 12 13 14 15 16 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 8 def initialize(runtime_args, = {}) super = YAML.load(File.read(File.join(destination_root, "config.yml"))) .each do |key, value| self.send(:instance_variable_set, "@#{key}", value) end @hypenated_name = @name.gsub(/_/, '-') end |
Instance Attribute Details
#author ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def @author end |
#email ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def email @email end |
#github_user ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def github_user @github_user end |
#header_color ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def header_color @header_color end |
#hypenated_name ⇒ Object (readonly)
Returns the value of attribute hypenated_name.
6 7 8 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 6 def hypenated_name @hypenated_name end |
#name ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def name @name end |
#theme ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def theme @theme end |
#title ⇒ Object (readonly)
these values are automatically setup by the config.yml file generated from jekyll_generator_generator.rb based on options/defaults
5 6 7 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 5 def title @title end |
Instance Method Details
#manifest ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/jekyll_generator/theme_generator_base.rb', line 18 def manifest record do |m| # Ensure appropriate folder(s) exists m.directory '_layouts' m.directory 'css' m.template_copy_each ["default.html", "post.html"], "_layouts" m.template_copy_each ["stylesheet.css"], "css" end end |