Class: ActiveCMIS::AtomicType::CommonBase

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

Direct Known Subclasses

DateTime, Decimal, Integer, Singleton, String

Instance Method Summary collapse

Instance Method Details

#can_handle?(value) ⇒ Boolean

Raises:

  • (NotImplementedError)

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

def can_handle?(value)
  raise NotImplementedError
end

#cmis2rb(value) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/active_cmis/atomic_types.rb', line 4

def cmis2rb(value)
  if value.children.empty? && value.attribute("nil")
    nil
  else
    _cmis2rb(value)
  end
end

#rb2cmis(xml, value) ⇒ Object


11
12
13
14
15
16
17
# File 'lib/active_cmis/atomic_types.rb', line 11

def rb2cmis(xml, value)
  if value.nil?
    xml.value("xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", "xsi:nil" => "true")
  else
    _rb2cmis(xml, value)
  end
end