Class: DojoMobileProto::Prototype

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/dojo_mobile_proto.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



9
10
11
# File 'lib/dojo_mobile_proto.rb', line 9

def self.source_root
 File.dirname(__FILE__)
end

Instance Method Details

#create_basic_viewObject



24
25
26
# File 'lib/dojo_mobile_proto.rb', line 24

def create_basic_view
  template('templates/view.tt', "#{name}/views/index.erb")
end

#create_gemfileObject



15
16
17
# File 'lib/dojo_mobile_proto.rb', line 15

def create_gemfile
  template('templates/gemfile.tt', "#{name}/Gemfile")
end

#create_proto_rubyObject



19
20
21
22
# File 'lib/dojo_mobile_proto.rb', line 19

def create_proto_ruby
  template('templates/proto.tt', "#{name}/#{name}.rb")
  FileUtils.chmod("+x","#{name}/#{name}.rb" )
end

#messageObject



28
29
30
31
32
33
34
# File 'lib/dojo_mobile_proto.rb', line 28

def message
  say "You are now ready to run the prototype."
  say "\tChange into the directory 'cd #{name}'"
  say "\tRun 'bundle install'"
  say "\tRun '#{name}.rb'"
  say "Now go and build you prototype in views/index.erb"
end