Class: Capnp::ObjectString
- Inherits:
-
Object
- Object
- Capnp::ObjectString
- Extended by:
- T::Generic, T::Sig
- Includes:
- String
- Defined in:
- lib/capnp/runtime/list/object/string.rb
Constant Summary collapse
- Elem =
type_member { {fixed: String} }
Instance Method Summary collapse
-
#initialize(string) ⇒ ObjectString
constructor
A new instance of ObjectString.
- #length ⇒ Object
- #to_s ⇒ Object
Methods included from String
Methods included from List
Constructor Details
#initialize(string) ⇒ ObjectString
Returns a new instance of ObjectString.
14 15 16 |
# File 'lib/capnp/runtime/list/object/string.rb', line 14 def initialize(string) @string = T.let(string.freeze, String) end |
Instance Method Details
#length ⇒ Object
25 |
# File 'lib/capnp/runtime/list/object/string.rb', line 25 def length = @string.length |
#to_s ⇒ Object
19 |
# File 'lib/capnp/runtime/list/object/string.rb', line 19 def to_s = @string |