Module: RailsAssist::Directory::Container::Methods
- Defined in:
- lib/rails_assist/directory/container.rb
Overview
return list of symbols for all kinds of supported Rails 3 containers (those that have a [container]_dir method)
Instance Method Summary collapse
Instance Method Details
#rails_containers ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/rails_assist/directory/container.rb', line 8 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 |
#valid_container?(type) ⇒ Boolean
16 17 18 |
# File 'lib/rails_assist/directory/container.rb', line 16 def valid_container? type rails_containers.include?(type) end |