Class: Simrpc::Message::Body
- Inherits:
-
Object
- Object
- Simrpc::Message::Body
- Defined in:
- lib/simrpc/message.rb
Overview
body consists of a list of data fields
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Body
constructor
A new instance of Body.
- #to_s ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Body
Returns a new instance of Body.
129 130 131 |
# File 'lib/simrpc/message.rb', line 129 def initialize(args = {}) @fields = [] end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
127 128 129 |
# File 'lib/simrpc/message.rb', line 127 def fields @fields end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
133 134 135 136 137 138 139 140 |
# File 'lib/simrpc/message.rb', line 133 def to_s s = '' @fields.each { |field| fs = field.to_s s += Formatter::format_with_size(fs) } return s end |