Class: Drupal::PostHook

Inherits:
Object
  • Object
show all
Defined in:
lib/drupal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cls, proc) ⇒ PostHook

Returns a new instance of PostHook.



22
23
24
25
# File 'lib/drupal.rb', line 22

def initialize cls, proc
  self.cls  = cls
  self.proc = proc
end

Instance Attribute Details

#clsObject

Returns the value of attribute cls.



16
17
18
# File 'lib/drupal.rb', line 16

def cls
  @cls
end

#procObject

Returns the value of attribute proc.



16
17
18
# File 'lib/drupal.rb', line 16

def proc
  @proc
end

Instance Method Details

#loadObject



18
19
20
# File 'lib/drupal.rb', line 18

def load
  cls.class_eval &proc
end