class Dsx::Dml::Operation
Public Class Methods
new(details, writer_options = false)
click to toggle source
# File lib/dsx/operation.rb, line 12 def initialize(details, writer_options = false) initialize_details(details) initialize_command(writer_options) end
Public Instance Methods
access_levels()
click to toggle source
# File lib/dsx/operation.rb, line 33 def access_levels return AccessLevelOp.new(self, @changeset) end
access_levels=(args=false)
click to toggle source
# File lib/dsx/operation.rb, line 37 def access_levels=(args=false) return self end
changeset()
click to toggle source
# File lib/dsx/operation.rb, line 55 def changeset @changeset end
curl(writer=false)
click to toggle source
# File lib/dsx/operation.rb, line 67 def curl(writer=false) @changeset.curl(writer) end
identifier()
click to toggle source
# File lib/dsx/operation.rb, line 51 def identifier @identifier end
last_type()
click to toggle source
# File lib/dsx/operation.rb, line 22 def last_type @type end
last_type=(type)
click to toggle source
# File lib/dsx/operation.rb, line 18 def last_type=(type) @type = type end
linking_level=(level)
click to toggle source
# File lib/dsx/operation.rb, line 41 def linking_level=(level) table = @changeset.table(:Cards) table.write({Code: @identifier, Loc: @location_num, OLL: level}) self end
net_sftp(writer=false)
click to toggle source
# File lib/dsx/operation.rb, line 63 def net_sftp(writer=false) @changeset.net_sftp(writer) end
reset_cards()
click to toggle source
# File lib/dsx/operation.rb, line 26 def reset_cards table = @changeset.table(:Names) table.dc table.write self end
tmp_access_levels()
click to toggle source
# File lib/dsx/operation.rb, line 47 def tmp_access_levels return TmpAccessLevelOp.new(self, @changeset) end
to_s()
click to toggle source
# File lib/dsx/operation.rb, line 59 def to_s @changeset.to_s end
Private Instance Methods
initialize_command(writer_options=false)
click to toggle source
# File lib/dsx/operation.rb, line 73 def initialize_command(writer_options=false) @zone = (writer_options) ? Zone.new(@location_num, @udf_num, writer_options) : Zone.new(@location_num, @udf_num) changeset = @zone.use(@identifier) changeset.table(:Names).write(FName: @first_name, LName: @last_name, Company: @company) changeset.table(:UDF).write(UdfNum: @udf_num, UdfText: @identifier) @changeset = changeset end
initialize_details(details)
click to toggle source
# File lib/dsx/operation.rb, line 84 def initialize_details(details) if( details.key?(:location_num) && details.key?(:udf_num) && details.key?(:first_name) && details.key?(:last_name) && details.key?(:company)&& details.key?(:identifier) ) @location_num = details[:location_num] @udf_num = details[:udf_num] @first_name = details[:first_name] @last_name = details[:last_name] @company = details[:company] @identifier = details[:identifier] else raise "Operation arguments missing" end end