Sha256: b8c2deb9a0c1fc65ede3ba617b76fc6d90c9a48e5b6867b2cd794ebfc1cfdb28

Contents?: true

Size: 315 Bytes

Versions: 4

Compression:

Stored size: 315 Bytes

Contents

class OpenStruct
  def [] key
    send key
  end unless method_defined? :[]

  def []= key, val
    send %(#{key}=), val
  end unless method_defined? :[]=
end if RUBY_ENGINE == 'rbx' || RUBY_VERSION < '2.0.0'

class OpenStruct
  def delete key
    begin
      delete_field key
    rescue ::NameError; end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
asciidoctor-pdf-1.5.0.alpha.16 lib/asciidoctor-pdf/core_ext/ostruct.rb
asciidoctor-pdf-1.5.0.alpha.15 lib/asciidoctor-pdf/core_ext/ostruct.rb
asciidoctor-pdf-1.5.0.alpha.14 lib/asciidoctor-pdf/core_ext/ostruct.rb
asciidoctor-pdf-1.5.0.alpha.13 lib/asciidoctor-pdf/core_ext/ostruct.rb