module Gogyou::Accessor::TemporaryMixin

Attributes

model__GOGYOU__[R]

Public Class Methods

new(buffer, offset, model) click to toggle source
Calls superclass method
# File lib/gogyou/accessor.rb, line 553
def initialize(buffer, offset, model)
  super(buffer, offset)
  @model__GOGYOU__ = model
  self.class.define_accessors(singleton_class, model)
end

Public Instance Methods

inspect() click to toggle source
# File lib/gogyou/accessor.rb, line 559
def inspect
  text = "{"
  model__GOGYOU__.fields.each_with_index do |f, i|
    text << "#{i > 0 ? ", " : ""}#{f.name}=#{__send__(f.name).inspect}"
  end
  text << "}"
end
pretty_print(q) click to toggle source
# File lib/gogyou/accessor.rb, line 567
def pretty_print(q)
  q.group(1, "{") do
    model__GOGYOU__.fields.each_with_index do |f, i|
      if i > 0
        q.text ","
        q.breakable " "
      end
      q.group(1, "#{f.name}=") do
        q.breakable ""
        q.pp __send__(f.name)
      end
    end
    q.text "}"
  end
end