Class: ActiveCMIS::AtomicType::Decimal

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

Overview

Qarning: Precision is ignored?

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CommonBase

#cmis2rb, #rb2cmis

Constructor Details

#initialize(precision = nil, min_value = nil, max_value = nil) ⇒ Decimal

Returns a new instance of Decimal


53
54
55
# File 'lib/active_cmis/atomic_types.rb', line 53

def initialize(precision = nil, min_value = nil, max_value = nil)
  @precision, @min_value, @max_value = precision, min_value, max_value
end

Instance Attribute Details

#max_valueObject (readonly)

Returns the value of attribute max_value


52
53
54
# File 'lib/active_cmis/atomic_types.rb', line 52

def max_value
  @max_value
end

#min_valueObject (readonly)

Returns the value of attribute min_value


52
53
54
# File 'lib/active_cmis/atomic_types.rb', line 52

def min_value
  @min_value
end

#precisionObject (readonly)

Returns the value of attribute precision


52
53
54
# File 'lib/active_cmis/atomic_types.rb', line 52

def precision
  @precision
end

Instance Method Details

#can_handle?(value) ⇒ Boolean

Returns:


71
72
73
# File 'lib/active_cmis/atomic_types.rb', line 71

def can_handle?(value)
  value.respond_to?(:to_s)
end

#to_sObject


57
58
59
# File 'lib/active_cmis/atomic_types.rb', line 57

def to_s
  "Decimal"
end