require 'thor/group' require 'active_support/inflector' module Couch module Generators class NamedBase < Base argument :name, :type => :string argument :attributes, :type => :array, :default => [] protected # force underscored and singularized model name def model_name @model_name ||= name.underscore.singularize end def pluralized_model_name model_name.pluralize end end end end