Class: LedgerSync::Type::ID
- Inherits:
-
Value
- Object
- ActiveModel::Type::Value
- Value
- LedgerSync::Type::ID
show all
- Includes:
- ValueMixin
- Defined in:
- lib/ledger_sync/type/id.rb
Overview
Instance Method Summary
collapse
Methods included from ValueMixin
#assert_valid, #cast, included, #valid?
Instance Method Details
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
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
|
#type ⇒ Object
18
19
20
|
# File 'lib/ledger_sync/type/id.rb', line 18
def type
:id
end
|
#valid_classes ⇒ Object
22
23
24
|
# File 'lib/ledger_sync/type/id.rb', line 22
def valid_classes
[::String, ::Symbol, ::Integer, ::NilClass]
end
|