class LocalPlugin

Attributes

root[R]

Public Class Methods

new(root) click to toggle source
# File lib/eac_rails_base0/app_generator/templates/lib/local_plugins.rb, line 37
def initialize(root)
  @root = root
end

Public Instance Methods

app?() click to toggle source
# File lib/eac_rails_base0/app_generator/templates/lib/local_plugins.rb, line 54
def app?
  root == LocalPlugins.rails_root
end
bundle() click to toggle source
# File lib/eac_rails_base0/app_generator/templates/lib/local_plugins.rb, line 41
def bundle
  bin_bundle = File.expand_path('bin/bundle', root)
  File.exist?(bin_bundle) ? 'bin/bundle' : 'bundle'
end
bundle_execute(args) click to toggle source
# File lib/eac_rails_base0/app_generator/templates/lib/local_plugins.rb, line 58
def bundle_execute(args)
  Dir.chdir(root) { system(*([bundle] + args)) }
end
name() click to toggle source
# File lib/eac_rails_base0/app_generator/templates/lib/local_plugins.rb, line 50
def name
  app? ? 'APP' : File.basename(root)
end
subpath(path) click to toggle source
# File lib/eac_rails_base0/app_generator/templates/lib/local_plugins.rb, line 46
def subpath(path)
  File.expand_path(path, root)
end