Class: Roda::Project::Generator

Inherits:
Object
  • Object
show all
Includes:
Helpers::Ids, Helpers::Template
Defined in:
lib/roda/project/generator.rb

Direct Known Subclasses

Bin::Generator, CLI

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Ids

#api_id, #fullstack_id, #id_to_string, #minimal_id, #minitest_id, #mysql_id, #postgresql_id, #rspec_id, #sqlite_id

Methods included from Helpers::Template

#cp_dir, #cp_file, #ensure_and_get_path, #erb_cp_dir, #erb_cp_file, #templates_root

Constructor Details

#initialize(context: MainContext.new, args: [], options: {}, dir: nil, pastel: Pastel.new) ⇒ Generator

Returns a new instance of Generator.



9
10
11
12
13
14
15
# File 'lib/roda/project/generator.rb', line 9

def initialize(context: MainContext.new, args: [], options: {}, dir: nil, pastel: Pastel.new)
  @context = context
  @args = args
  @options = options
  @dir = dir
  @pastel = pastel
end

Instance Attribute Details

#pastelObject (readonly)

Returns the value of attribute pastel.



7
8
9
# File 'lib/roda/project/generator.rb', line 7

def pastel
  @pastel
end

Instance Method Details

#callObject



17
18
19
# File 'lib/roda/project/generator.rb', line 17

def call
  false
end