Class: Cadenya::Types::ObjectiveEventData_MemoryRead

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: nil, memory_read: nil) ⇒ ObjectiveEventData_MemoryRead

Returns a new instance of ObjectiveEventData_MemoryRead.



8780
8781
8782
8783
# File 'lib/cadenya/types.rb', line 8780

def initialize(type: nil, memory_read: nil)
  @type = type
  @memory_read = memory_read
end

Instance Attribute Details

#memory_readObject (readonly)

Returns the value of attribute memory_read.



8778
8779
8780
# File 'lib/cadenya/types.rb', line 8778

def memory_read
  @memory_read
end

#typeObject (readonly)

Returns the value of attribute type.



8778
8779
8780
# File 'lib/cadenya/types.rb', line 8778

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8785
8786
8787
8788
8789
8790
# File 'lib/cadenya/types.rb', line 8785

def self.from_json(data)
  new(
    type: data["type"],
    memory_read: data["memoryRead"].nil? ? nil : Types::MemoryRead.from_json(data["memoryRead"]),
  )
end

Instance Method Details

#to_hObject



8792
8793
8794
8795
8796
8797
# File 'lib/cadenya/types.rb', line 8792

def to_h
  {
    type: Util.plain(@type),
    memory_read: Util.plain(@memory_read),
  }.reject { |_k, v| v.nil? }
end