class ADSL::Extract::Rails::PartiallyUnknownHash

Public Class Methods

new(options = {}) click to toggle source
# File lib/adsl/extract/rails/other_meta.rb, line 33
def initialize(options = {})
  @options = options
end

Public Instance Methods

[](arg) click to toggle source
# File lib/adsl/extract/rails/other_meta.rb, line 37
def [](arg)
  @options[arg] || MetaUnknown.new
end
[]=(key, val) click to toggle source
# File lib/adsl/extract/rails/other_meta.rb, line 41
def []=(key, val)
  @options[key] = val
end
method_missing(method, *args, &block) click to toggle source
# File lib/adsl/extract/rails/other_meta.rb, line 45
def method_missing(method, *args, &block)
  return @options[method] if @options.include? method
  if method.to_s =~ /^.*=$/
    short_method = method.to_s[0..-2].to_sym
    return @options[short_method] if @options.include? short_method
  end
  super
end