Class: Pieces::Generator
- Inherits:
-
Object
- Object
- Pieces::Generator
- Includes:
- Configurable, Thor::Actions, Thor::Shell
- Defined in:
- lib/pieces/generator.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes included from Configurable
Class Method Summary collapse
Instance Method Summary collapse
- #init ⇒ Object
-
#initialize(config) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(config) ⇒ Generator
Returns a new instance of Generator.
21 22 23 24 25 |
# File 'lib/pieces/generator.rb', line 21 def initialize(config) super = {} self.destination_root = config.path end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
19 20 21 |
# File 'lib/pieces/generator.rb', line 19 def end |
Class Method Details
.from_superclass(method, default) ⇒ Object
9 10 11 |
# File 'lib/pieces/generator.rb', line 9 def self.from_superclass(method, default) default end |
.init(config = {}) ⇒ Object
5 6 7 |
# File 'lib/pieces/generator.rb', line 5 def self.init(config = {}) new(Pieces::Config.new(config.merge(load: false))).init end |
Instance Method Details
#init ⇒ Object
27 28 29 30 31 32 |
# File 'lib/pieces/generator.rb', line 27 def init directory 'app/assets/stylesheets' directory 'app/views' copy_file 'config/pieces.yml' copy_file 'Gemfile' end |