Class: LedgerSync::Type::ID

Inherits:
Value
  • Object
show all
Includes:
ValueMixin
Defined in:
lib/ledger_sync/type/id.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from ValueMixin

#assert_valid, #cast, included, #valid?

Instance Method Details

#cast?Boolean

Returns:



10
11
12
# File 'lib/ledger_sync/type/id.rb', line 10

def cast?
  true
end

#changed_in_place?(raw_old_value, new_value) ⇒ Boolean

Returns:



14
15
16
# File 'lib/ledger_sync/type/id.rb', line 14

def changed_in_place?(raw_old_value, new_value)
  raw_old_value != new_value if new_value.is_a?(::String)
end

#typeObject



18
19
20
# File 'lib/ledger_sync/type/id.rb', line 18

def type
  :id
end

#valid_classesObject



22
23
24
# File 'lib/ledger_sync/type/id.rb', line 22

def valid_classes
  [::String, ::Symbol, ::Integer, ::NilClass]
end