Sha256: 3060222cbd0340c7c061ab0f132802002537e619a3576263a15d14c811ee53c0
Contents?: true
Size: 418 Bytes
Versions: 5
Compression:
Stored size: 418 Bytes
Contents
# frozen_string_literal: true module MyTankInfo class Object def initialize(attributes) @attributes = OpenStruct.new(attributes) end def method_missing(method, *args, &block) attribute = @attributes.send(method, *args, &block) attribute.is_a?(Hash) ? Object.new(attribute) : attribute end def respond_to_missing?(method, include_private = false) true end end end
Version data entries
5 entries across 5 versions & 1 rubygems