Class: AsProject::AsProjectBase
- Inherits:
-
Object
- Object
- AsProject::AsProjectBase
- Defined in:
- lib/asproject_base.rb
Instance Method Summary collapse
- #capitalize(word) ⇒ Object
- #finish ⇒ Object
- #out(msg) ⇒ Object
- #put_created(file) ⇒ Object
- #uncapitalize(word) ⇒ Object
Instance Method Details
#capitalize(word) ⇒ Object
10 11 12 13 14 |
# File 'lib/asproject_base.rb', line 10 def capitalize(word) chars = word.split('') chars[0].upcase! return chars.join('') end |
#finish ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/asproject_base.rb', line 22 def finish if(@arguments.verbose) puts '---------------------------' if(@created_files.size == 0) puts '>> No files were created' return end @created_files.each do |file| put_created(file) end end end |
#out(msg) ⇒ Object
4 5 6 7 8 |
# File 'lib/asproject_base.rb', line 4 def out(msg) if(@arguments.verbose) puts msg end end |
#put_created(file) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/asproject_base.rb', line 35 def put_created(file) if(@arguments.execution_dir.index(Dir.pwd)) puts '>> Created file at: ' + file.gsub(@arguments.execution_dir, '.') else puts '>> Created file at: ' + file end end |
#uncapitalize(word) ⇒ Object
16 17 18 19 20 |
# File 'lib/asproject_base.rb', line 16 def uncapitalize(word) chars = word.split('') chars[0].downcase! return chars.join('') end |