mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-13 23:02:35 +00:00
23 lines
357 B
Ruby
23 lines
357 B
Ruby
class IMICRTS
|
|
class FriendlyHash
|
|
def initialize
|
|
@hash = {}
|
|
end
|
|
|
|
def [](key)
|
|
@hash[key.to_sym]
|
|
end
|
|
|
|
def []=(key, value)
|
|
@hash[key.to_sym] = value
|
|
end
|
|
|
|
def method_missing(method)
|
|
if value = @hash.dig(method)
|
|
value
|
|
else
|
|
raise "Unknown value for: #{method}"
|
|
end
|
|
end
|
|
end
|
|
end |