Class: Pocolog::Upgrade::Ops::Identity

Inherits:
Base
  • Object
show all
Defined in:
lib/pocolog/upgrade/ops/identity.rb

Instance Attribute Summary

Attributes inherited from Base

#to_type

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Pocolog::Upgrade::Ops::Base

Instance Method Details

#call(target, value) ⇒ Object



9
10
11
# File 'lib/pocolog/upgrade/ops/identity.rb', line 9

def call(target, value)
    Typelib.copy(target, value)
end

#convert(value) ⇒ Object



5
6
7
# File 'lib/pocolog/upgrade/ops/identity.rb', line 5

def convert(value)
    value
end

#identity?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/pocolog/upgrade/ops/identity.rb', line 13

def identity?
    true
end