Module: Jets::CLI::Group::Helpers

Extended by:
Memoist
Included in:
Base
Defined in:
lib/jets/cli/group/helpers.rb

Instance Method Summary collapse

Instance Method Details

#class_nameObject



5
6
7
# File 'lib/jets/cli/group/helpers.rb', line 5

def class_name
  name.camelize
end

#frameworkObject



18
19
20
# File 'lib/jets/cli/group/helpers.rb', line 18

def framework
  Jets::Framework.name
end

#init_project_nameObject



13
14
15
16
# File 'lib/jets/cli/group/helpers.rb', line 13

def init_project_name
  # inferred from the folder name
  Dir.pwd.split("/").last.gsub(/[^a-zA-Z0-9_]/, "-").squeeze("-")
end

#package_typeObject



22
23
24
# File 'lib/jets/cli/group/helpers.rb', line 22

def package_type
  (framework == "rails") ? "image" : "zip"
end

#underscore_nameObject



9
10
11
# File 'lib/jets/cli/group/helpers.rb', line 9

def underscore_name
  name.underscore
end