class Gogyou::Primitive
Constants
- BasicStruct
Public Class Methods
new(name, bytesize, bytealign, aset, aref)
click to toggle source
Calls superclass method
# File lib/gogyou/primitives.rb, line 13 def initialize(name, bytesize, bytealign, aset, aref) super(name.intern, bytesize.to_i, bytealign.to_i) define_singleton_method(:aset, aset) define_singleton_method(:aref, aref) end
Public Instance Methods
extensible?()
click to toggle source
# File lib/gogyou/primitives.rb, line 19 def extensible? false end
pretty_print(q)
click to toggle source
# File lib/gogyou/primitives.rb, line 29 def pretty_print(q) #name, bytesize, bytealign q.group(1, "\#<#{self.class}:#{name}") do q.breakable " " q.text "bytesize=" q.pp bytesize q.text "," q.breakable " " q.text "bytealign=" q.pp bytealign end q.text ">" end
to_s()
click to toggle source
# File lib/gogyou/primitives.rb, line 23 def to_s "\#<#{self.class}:#{name} bytesize=#{bytesize.inspect}, bytealign=#{bytealign.inspect}>" end
Also aliased as: inspect