Sha256: 3df9ec9d627bb5c2eb4e60c92c1976565b59962b5f60e62f8c73019f040eed99
Contents?: true
Size: 683 Bytes
Versions: 8
Compression:
Stored size: 683 Bytes
Contents
module RailsAssist::Directory module Container # return list of symbols for all kinds of supported Rails 3 containers # (those that have a [container]_dir method) module Methods def rails_containers app_methods = RailsAssist::Directory.instance_methods artifact_methods = RailsAssist::Artifact::Directory.instance_methods all_methods = app_methods + artifact_methods all_methods.grep(/_dir$/).map{|dir| dir.to_s.gsub(/^(.*)_dir/, '\1').to_sym } end def valid_container? type rails_containers.include?(type) end end include Methods extend Methods end end
Version data entries
8 entries across 8 versions & 1 rubygems