Sha256: 7b26a846719c1b625bfb2d4828fddabdc6d651a19803c1c80782876d7585ee2f

Contents?: true

Size: 248 Bytes

Versions: 1

Compression:

Stored size: 248 Bytes

Contents

class ObjectExtractor
  attr_reader :parent

  def initialize(value, parent)
    @value = value
    @parent = parent
  end

  def [](symbol)
    if @value.respond_to? symbol
      @value.send(symbol)
    else
      @parent[symbol]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
musterb-0.0.1 lib/musterb/object_extractor.rb