Module: Jets::CLI::Group::Helpers
Instance Method Summary collapse
- #class_name ⇒ Object
- #framework ⇒ Object
- #init_project_name ⇒ Object
- #package_type ⇒ Object
- #underscore_name ⇒ Object
Instance Method Details
#class_name ⇒ Object
5 6 7 |
# File 'lib/jets/cli/group/helpers.rb', line 5 def class_name name.camelize end |
#framework ⇒ Object
18 19 20 |
# File 'lib/jets/cli/group/helpers.rb', line 18 def framework Jets::Framework.name end |
#init_project_name ⇒ Object
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_type ⇒ Object
22 23 24 |
# File 'lib/jets/cli/group/helpers.rb', line 22 def package_type (framework == "rails") ? "image" : "zip" end |
#underscore_name ⇒ Object
9 10 11 |
# File 'lib/jets/cli/group/helpers.rb', line 9 def underscore_name name.underscore end |