Sha256: 2ea057d9b2d80a3353e5a565019e4a35b6c5e8d63d0733ac940b74dc67472112
Contents?: true
Size: 370 Bytes
Versions: 5
Compression:
Stored size: 370 Bytes
Contents
require 'ostruct' module A9n class Struct < OpenStruct def keys @table.keys end def fetch(name, default = nil) @table[name.to_sym] || default end def method_missing(name, *args) unless @table.key?(name.to_sym) raise NoSuchConfigurationVariable.new(name) end return @table[name.to_sym] end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
a9n-0.1.1 | lib/a9n/struct.rb |
a9n-0.1.0 | lib/a9n/struct.rb |
a9n-0.0.9 | lib/a9n/struct.rb |
a9n-0.0.8 | lib/a9n/struct.rb |
a9n-0.0.7 | lib/a9n/struct.rb |