Class: SK::SDK::Sync::Field
- Inherits:
-
Object
- Object
- SK::SDK::Sync::Field
- Defined in:
- lib/sk_sdk/sync.rb
Overview
A Sync::Field holds the local(left) and remote(right) field name and if available the transfer methods.
Instance Attribute Summary collapse
-
#l_name ⇒ Object
readonly
Returns the value of attribute l_name.
-
#l_trans ⇒ Object
readonly
Returns the value of attribute l_trans.
-
#r_name ⇒ Object
readonly
Returns the value of attribute r_name.
-
#r_trans ⇒ Object
readonly
Returns the value of attribute r_trans.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Field
constructor
Create a new sync field.
- #transition? ⇒ Boolean
Constructor Details
#initialize(opts) ⇒ Field
Create a new sync field. The local and remote name MUST be set. Transition methods are optional.
152 153 154 155 156 157 158 |
# 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 |
Instance Attribute Details
#l_name ⇒ Object (readonly)
Returns the value of attribute l_name.
139 140 141 |
# File 'lib/sk_sdk/sync.rb', line 139 def l_name @l_name end |
#l_trans ⇒ Object (readonly)
Returns the value of attribute l_trans.
139 140 141 |
# File 'lib/sk_sdk/sync.rb', line 139 def l_trans @l_trans end |
#r_name ⇒ Object (readonly)
Returns the value of attribute r_name.
139 140 141 |
# File 'lib/sk_sdk/sync.rb', line 139 def r_name @r_name end |
#r_trans ⇒ Object (readonly)
Returns the value of attribute r_trans.
139 140 141 |
# File 'lib/sk_sdk/sync.rb', line 139 def r_trans @r_trans end |
Instance Method Details
#transition? ⇒ Boolean
160 161 162 |
# File 'lib/sk_sdk/sync.rb', line 160 def transition? @l_trans && @r_trans end |