Sha256: e285aea899bb9ea692d0980725e0239b6fef91805b9df68a5ebff5763bca21f6
Contents?: true
Size: 493 Bytes
Versions: 10
Compression:
Stored size: 493 Bytes
Contents
module A9n class Struct extend Forwardable def_delegators :data, :empty?, :keys, :key?, :fetch, :[], :[]= def initialize(data = {}) @data = data end def to_hash data end def merge(another_data) data.merge!(another_data) end def method_missing(name, *args) if data.key?(name) fetch(name) else fail NoSuchConfigurationVariableError.new(name) end end private attr_reader :data end end
Version data entries
10 entries across 10 versions & 1 rubygems