class SK::SDK::Sync::Field
A Sync::Field
holds the local(left) and remote(right) field name and if available the transfer methods.
Attributes
l_name[R]
l_trans[R]
r_name[R]
r_trans[R]
Public Class Methods
new(opts)
click to toggle source
Create a new sync field. The local and remote name MUST be set. Transition methods are optional.
@example no transition methods:
opts = [:local_name, :remote_name] fld = Field.new opts
@example with transition method:
opts = [:local_name, :remote_name, "AClass.local_transition", "AClass.remote_transition"] fld = Field.new opts
@param [Array<String, Symbol>] opts
# File lib/sk_sdk/sync.rb, line 152 def initialize(opts) if opts.is_a? Array @l_trans, @r_trans = opts[2], opts[3] if opts.length == 4 @l_name = opts[0] @r_name = opts[1] end end
Public Instance Methods
transition?()
click to toggle source
# File lib/sk_sdk/sync.rb, line 160 def transition? @l_trans && @r_trans end