Sha256: 9851574531ee71fc3cf1ffc4451e38675627aad6fcab845616db5d7c5c1317bc
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
require 'couch' require 'couch/mapper' require 'couch/core_ext/string/inflections' require 'rubygems' require "rest_client" require 'json' require 'thor/group' module Couch module Actions class Base < Thor::Group attr_reader :mapper include Thor::Actions class_option :database, :type => :string def initialize(*args) super @mapper = Mapper.new(destination_root) end def self.banner "couch #{to_s.split('::').last.underscore}" end private def database options[:database] || Couch.database end def url_for(id) File.join database, id end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
couch-0.0.2 | lib/couch/actions/base.rb |
couch-0.0.1 | lib/couch/actions/base.rb |