Sha256: d88f832dc4fdc1e35a7b2d22096a303fdf642d34ba993a76f9748b138cb62cd7
Contents?: true
Size: 691 Bytes
Versions: 2
Compression:
Stored size: 691 Bytes
Contents
require 'couch' require 'couch/mapper' require 'rubygems' require "rest_client" require 'json' require 'thor/group' require 'active_support/core_ext/string/inflections' 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.4 | lib/couch/actions/base.rb |
couch-0.0.3 | lib/couch/actions/base.rb |