Module: Document::ClassMethods

Defined in:
lib/rhoconnect/document.rb

Instance Method Summary collapse

Instance Method Details

#define_valid_doctypes(doctypes = []) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/rhoconnect/document.rb', line 9

def define_valid_doctypes(doctypes = [])
  @valid_doctypes ||= {}
  doctypes.each do |doctype|
    @valid_doctypes[doctype.to_sym] = :document
  end
  @enforce_valid_doctypes ||= true
end

#define_valid_queues(queues = []) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/rhoconnect/document.rb', line 17

def define_valid_queues(queues = [])
  @valid_doctypes ||= {}
  queues.each do |doctype|
    @valid_doctypes[doctype.to_sym] = :queue
  end
  @enforce_valid_doctypes ||= true
end

#enforce_valid_doctypesObject



30
31
32
# File 'lib/rhoconnect/document.rb', line 30

def enforce_valid_doctypes
  @enforce_valid_doctypes ||= false
end

#enforce_valid_doctypes=(enforce_flag) ⇒ Object



33
34
35
# File 'lib/rhoconnect/document.rb', line 33

def enforce_valid_doctypes=(enforce_flag)
  @enforce_valid_doctypes = enforce_flag
end

#valid_doctypesObject



25
26
27
28
# File 'lib/rhoconnect/document.rb', line 25

def valid_doctypes
  @valid_doctypes ||= {}
  @valid_doctypes
end