class Tone
Attributes
blue[RW]
gray[RW]
green[RW]
red[RW]
Public Class Methods
_load(obj)
click to toggle source
# File lib/rmxp_extractor/classnames.rb, line 149 def self._load(obj) data = *obj.unpack("EEEE") s_hash = { "red": data[0], "green": data[1], "blue": data[2], "gray": data[3], } hash = {} s_hash.each do |key, value| hash[key.to_s] = value end Tone.new hash end
new(hash = {})
click to toggle source
# File lib/rmxp_extractor/classnames.rb, line 129 def initialize(hash = {}) @red = hash["red"] @green = hash["green"] @blue = hash["blue"] @gray = hash["gray"] end
Public Instance Methods
_dump(limit)
click to toggle source
# File lib/rmxp_extractor/classnames.rb, line 145 def _dump(limit) [@red, @green, @blue, @gray].pack("EEEE") end
hash()
click to toggle source
# File lib/rmxp_extractor/classnames.rb, line 136 def hash dump = { red: @red, green: @green, blue: @blue, gray: @gray, } end