Class: Gqldb::Parameter
- Inherits:
-
Object
- Object
- Gqldb::Parameter
- Defined in:
- lib/tina4_ultipa/pb.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name: "", value: TypedValue.new) ⇒ Parameter
constructor
A new instance of Parameter.
Constructor Details
#initialize(name: "", value: TypedValue.new) ⇒ Parameter
Returns a new instance of Parameter.
212 213 214 215 |
# File 'lib/tina4_ultipa/pb.rb', line 212 def initialize(name: "", value: TypedValue.new) @name = name.to_s @value = value end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
210 211 212 |
# File 'lib/tina4_ultipa/pb.rb', line 210 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
210 211 212 |
# File 'lib/tina4_ultipa/pb.rb', line 210 def value @value end |
Class Method Details
.encode(msg) ⇒ Object
217 218 219 220 221 222 223 |
# File 'lib/tina4_ultipa/pb.rb', line 217 def self.encode(msg) buf = "".b Wire.write_string(buf, 1, msg.name) inner = TypedValue.encode(msg.value) Wire.write_bytes(buf, 2, inner) buf end |