Class: Drupal::CCK::Builder
- Inherits:
-
Object
- Object
- Drupal::CCK::Builder
- Defined in:
- lib/drupal/cck/builder.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.code ⇒ Object
4 5 6 7 8 9 |
# File 'lib/drupal/cck/builder.rb', line 4 def self.code types. map{|t| table = Table.new t}. select{|t| t.valid?}. join("\n") end |
.fields ⇒ Object
15 16 17 |
# File 'lib/drupal/cck/builder.rb', line 15 def self.fields @fields ||= Drupal::Repository.adapter.query('show tables').select{|t| t.match(/^content_field/)} end |
.types ⇒ Object
11 12 13 |
# File 'lib/drupal/cck/builder.rb', line 11 def self.types @types ||= ContentType.all.map{|t| t.content_type } end |