Module: Drupal

Defined in:
lib/drupal83.rb,
lib/drupal/cck.rb,
lib/drupal/file.rb,
lib/drupal/node.rb,
lib/drupal/role.rb,
lib/drupal/user.rb,
lib/drupal/comment.rb,
lib/drupal/version.rb,
lib/drupal/node_type.rb,
lib/drupal/cck/fields.rb,
lib/drupal/permission.rb,
lib/drupal/cck/builder.rb

Overview

require ‘rake’ load ‘tasks/drupal83.rake’

Defined Under Namespace

Modules: CCK Classes: Comment, File, Node, NodeRevision, NodeType, Permission, PostHook, Role, User, UserRole

Constant Summary collapse

RepositoryName =
:drupal
Repository =
repository(Drupal::RepositoryName)
VERSION =
"0.1.8"

Class Method Summary collapse

Class Method Details

.commonObject



10
11
12
13
14
15
16
17
18
# File 'lib/drupal83.rb', line 10

def self.common
  "
    include DataMapper::Resource
  
    def self.default_repository_name
      Drupal::RepositoryName
    end
  "
end

.generateObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/drupal/cck/builder.rb', line 82

def self.generate
  Drupal.class_eval do
    eval( CCK::Builder.fields.map do |field|
      CCK::ThroughField.new field
    end.join("\n") )

    eval CCK::Builder.code
    
    Drupal.hooks.each do |hook|
      hook.load
    end
  end
end

.hooksObject



33
34
35
36
# File 'lib/drupal83.rb', line 33

def self.hooks
  @hooks||= []
  @hooks
end

.hooks=(hook) ⇒ Object



38
39
40
41
# File 'lib/drupal83.rb', line 38

def self.hooks= hook
  hooks
  @hooks << hook
end