Sha256: 4d38e8c39aeb2417382c3516efb46d4fcb6ae8e03fb3c24412d0f59382defcf8
Contents?: true
Size: 557 Bytes
Versions: 42
Compression:
Stored size: 557 Bytes
Contents
module OasParser module RawAccessor def self.included(klass) klass.extend ClassMethods end def method_missing(method_name, *args, &block) super unless self.class.get_raw_keys.include? method_name raw[method_name.to_s] end def respond_to_missing?(method_name, include_private = false) self.class.get_raw_keys.include?(method_name) || super end module ClassMethods def raw_keys(*args) @raw_keys = args end def get_raw_keys @raw_keys || [] end end end end
Version data entries
42 entries across 42 versions & 2 rubygems