Class: Capnp::ObjectString

Inherits:
Object
  • Object
show all
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

Methods included from String

#to_obj

Methods included from List

#[], #each, #to_obj

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

#lengthObject



25
# File 'lib/capnp/runtime/list/object/string.rb', line 25

def length = @string.length

#to_sObject



19
# File 'lib/capnp/runtime/list/object/string.rb', line 19

def to_s = @string