class MonkeyButler::Targets::Base

Attributes

database[R]
migrations[R]
project[R]

Public Class Methods

name() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 13
def name
  "#{self}".split('::').last.gsub(/Target$/, '').downcase
end
register_with_cli(cli) click to toggle source
# File lib/monkey_butler/targets/base.rb, line 17
def register_with_cli(cli)
  # Allows targets a chance to configure the CLI
  # This is an ideal place to register any options, tweak description, etc.
end
source_root() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 9
def source_root
  File.join File.dirname(__FILE__), name
end

Public Instance Methods

drop() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 63
def drop
  # Default implementation does nothing
end
dump() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 53
def dump
  # Default implementation does nothing
end
generate() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 38
def generate
  # Default implementation does nothing
end
init() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 28
def init
  # Default implementation does nothing
end
load() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 58
def load
  # Default implementation does nothing
end
new(path) click to toggle source
# File lib/monkey_butler/targets/base.rb, line 33
def new(path)
  # Default implementation does nothing
end
push() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 43
def push
  # Default implementation does nothing
end
validate() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 48
def validate
  # Default implementation does nothing
end

Protected Instance Methods

database_url() click to toggle source
# File lib/monkey_butler/targets/base.rb, line 76
def database_url
  (options[:database] && URI(options[:database])) || project.database_url
end