Class: Bunto::ThemeBuilder

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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.expand_path(name, Dir.pwd))
  @code_of_conduct = !!opts["code_of_conduct"]
end

Instance Attribute Details

#code_of_conductObject (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

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/bunto/theme_builder.rb', line 6

def name
  @name
end

#pathObject (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