class PrettyRailsConsole::InstallGenerator

Public Instance Methods

update_gemfile() click to toggle source
# File lib/generators/pretty_rails_console/install/install_generator.rb, line 6
def update_gemfile
  gem_group :development, :test do
    gem 'hirb'
    gem 'hirb-unicode-steakknife', require: 'hirb-unicode'
    gem 'pry-byebug'
    gem 'pry-stack_explorer'
  end

  inject_into_file 'Gemfile', indication, before: gem_group_declaration
end
write_to_pryrc_file() click to toggle source
# File lib/generators/pretty_rails_console/install/install_generator.rb, line 17
def write_to_pryrc_file
  copy_file '.pryrc', '.pryrc'
end

Private Instance Methods

gem_group_declaration() click to toggle source
# File lib/generators/pretty_rails_console/install/install_generator.rb, line 30
def gem_group_declaration
  "group :development, :test do\n"\
    "  gem 'hirb'\n"
end
indication() click to toggle source
# File lib/generators/pretty_rails_console/install/install_generator.rb, line 23
def indication
   "# Please clean up duplicated gems if any.\n"\
     "# Feel free to remove gems that you don't want to use or "\
     "if they conflict with other gem dependencies. "\
     "(you might need to update .pryrc also)\n"
end