class Deano::NameCommand
Attributes
args[RW]
name[RW]
Public Class Methods
inherited(klass)
click to toggle source
# File lib/deano/commands/name_command.rb, line 6 def self.inherited(klass) Command.inherited(klass) end
new(args)
click to toggle source
# File lib/deano/commands/name_command.rb, line 18 def initialize(args) self.args = args self.name = ARGV[1] @app_dir = File.expand_path(FileUtils.pwd) end
Public Instance Methods
classified()
click to toggle source
# File lib/deano/commands/name_command.rb, line 14 def classified self.name.classify end
clean_string(f)
click to toggle source
# File lib/deano/commands/name_command.rb, line 24 def clean_string(f) f.gsub(Deano.template_dir, @app_dir).gsub("template_app", self.underscored).gsub("TemplateApp", self.classified) end
underscored()
click to toggle source
# File lib/deano/commands/name_command.rb, line 10 def underscored self.name.underscore end