Class: SML::GetProcParameter::Request
- Inherits:
-
Object
- Object
- SML::GetProcParameter::Request
- Defined in:
- lib/ruby-sml/sml-getprocparameter.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#parameter_treepath ⇒ Object
Returns the value of attribute parameter_treepath.
-
#password ⇒ Object
Returns the value of attribute password.
-
#server_id ⇒ Object
Returns the value of attribute server_id.
-
#username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(server_id, username, password, parameter_treepath, attribute) ⇒ Request
constructor
A new instance of Request.
- #to_a ⇒ Object
Constructor Details
#initialize(server_id, username, password, parameter_treepath, attribute) ⇒ Request
Returns a new instance of Request.
11 12 13 14 15 16 17 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 11 def initialize(server_id, username, password, parameter_treepath, attribute) @server_id = server_id @username = username @password = password @parameter_treepath = parameter_treepath @attribute = attribute end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
9 10 11 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 9 def attribute @attribute end |
#parameter_treepath ⇒ Object
Returns the value of attribute parameter_treepath.
9 10 11 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 9 def parameter_treepath @parameter_treepath end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 9 def password @password end |
#server_id ⇒ Object
Returns the value of attribute server_id.
9 10 11 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 9 def server_id @server_id end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 9 def username @username end |
Class Method Details
.construct(array_rep) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 19 def self.construct(array_rep) return nil if array_rep.nil? server_id = array_rep.shift username = array_rep.shift password = array_rep.shift parameter_treepath = SML::Treepath.construct(array_rep.shift) attribute = array_rep.shift return nil if parameter_treepath.nil? return SML::GetProcParameter::Request.new(server_id, username, password, parameter_treepath, attribute) end |
Instance Method Details
#to_a ⇒ Object
30 31 32 |
# File 'lib/ruby-sml/sml-getprocparameter.rb', line 30 def to_a return [] << server_id << username << password << parameter_treepath.to_a << attribute end |