Class: Bunto::ThemeBuilder
- Inherits:
-
Object
- Object
- Bunto::ThemeBuilder
- Defined in:
- lib/bunto/theme_builder.rb
Defined Under Namespace
Classes: ERBRenderer
Constant Summary collapse
- SCAFFOLD_DIRECTORIES =
%w( _layouts _includes _sass ).freeze
Instance Attribute Summary collapse
-
#code_of_conduct ⇒ Object
readonly
Returns the value of attribute code_of_conduct.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #create! ⇒ Object
-
#initialize(theme_name, opts) ⇒ ThemeBuilder
constructor
A new instance of ThemeBuilder.
Constructor Details
#initialize(theme_name, opts) ⇒ ThemeBuilder
Returns a new instance of ThemeBuilder.
8 9 10 11 12 |
# File 'lib/bunto/theme_builder.rb', line 8 def initialize(theme_name, opts) @name = theme_name.to_s.tr(" ", "_").gsub(%r!_+!, "_") @path = Pathname.new(File.(name, Dir.pwd)) @code_of_conduct = !!opts["code_of_conduct"] end |
Instance Attribute Details
#code_of_conduct ⇒ Object (readonly)
Returns the value of attribute code_of_conduct.
6 7 8 |
# File 'lib/bunto/theme_builder.rb', line 6 def code_of_conduct @code_of_conduct end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/bunto/theme_builder.rb', line 6 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/bunto/theme_builder.rb', line 6 def path @path end |
Instance Method Details
#create! ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/bunto/theme_builder.rb', line 14 def create! create_directories create_starter_files create_gemspec create_accessories initialize_git_repo end |