Class: SML::PublicOpen::Request
- Inherits:
-
Object
- Object
- SML::PublicOpen::Request
- Defined in:
- lib/ruby-sml/sml-publicopen.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#codepage ⇒ Object
Returns the value of attribute codepage.
-
#password ⇒ Object
Returns the value of attribute password.
-
#request_file_id ⇒ Object
Returns the value of attribute request_file_id.
-
#server_id ⇒ Object
Returns the value of attribute server_id.
-
#sml_version ⇒ Object
Returns the value of attribute sml_version.
-
#username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(codepage, client_id, request_file_id, server_id, username, password, sml_version) ⇒ Request
constructor
A new instance of Request.
- #to_a ⇒ Object
Constructor Details
#initialize(codepage, client_id, request_file_id, server_id, username, password, sml_version) ⇒ Request
Returns a new instance of Request.
10 11 12 13 14 15 16 17 18 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 10 def initialize(codepage, client_id, request_file_id, server_id, username, password, sml_version) @codepage = codepage @client_id = client_id @request_file_id = request_file_id @server_id = server_id @username = username @password = password @sml_version = sml_version end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def client_id @client_id end |
#codepage ⇒ Object
Returns the value of attribute codepage.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def codepage @codepage end |
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def password @password end |
#request_file_id ⇒ Object
Returns the value of attribute request_file_id.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def request_file_id @request_file_id end |
#server_id ⇒ Object
Returns the value of attribute server_id.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def server_id @server_id end |
#sml_version ⇒ Object
Returns the value of attribute sml_version.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def sml_version @sml_version end |
#username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 8 def username @username end |
Class Method Details
.construct(array_rep) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 20 def self.construct(array_rep) return nil if array_rep.nil? codepage = array_rep.shift client_id = array_rep.shift request_file_id = array_rep.shift server_id = array_rep.shift username = array_rep.shift password = array_rep.shift sml_version = array_rep.shift array_rep.shift unless sml_version.nil? return SML::PublicOpen::Request.new(codepage, client_id, request_file_id, server_id, username, password, sml_version) end |
.pconstruct(o = {}) ⇒ Object
34 35 36 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 34 def self.pconstruct(o={}) return SML::PublicOpen::Request.new(o[:codepage], o[:client_id], o[:request_file_id], o[:server_id], o[:username], o[:password], o[:sml_version]) end |
Instance Method Details
#to_a ⇒ Object
38 39 40 41 42 |
# File 'lib/ruby-sml/sml-publicopen.rb', line 38 def to_a result = [] << codepage << client_id << request_file_id << server_id << username << password << sml_version result << :uint8 unless sml_version.nil? return result end |