Sha256: 118a51e603072486ffd43436b2e2c291f2b7442f34a4e69909fc410c9eb4da0b

Contents?: true

Size: 591 Bytes

Versions: 7

Compression:

Stored size: 591 Bytes

Contents

# Joc's monkeypatch for string bytesize (only available in 1.8.7+)
if !"amf".respond_to? :bytesize
  class String #:nodoc:
    def bytesize
      self.size
    end
  end
end

# Add <tt>ArrayCollection</tt> override to arrays
class Array
  # Override <tt>RocketAMF::ClassMapper.use_array_collection</tt> setting for
  # this array. Adds <tt>is_array_collection?</tt> method, which is used by the
  # serializer over the global config if defined.
  def is_array_collection= a
    @is_array_collection = a

    def self.is_array_collection? #:nodoc:
      @is_array_collection
    end
  end
end

Version data entries

7 entries across 7 versions & 4 rubygems

Version Path
mrpin-rocketamf-1.0.4 lib/rocketamf/extensions.rb
mrpin-rocketamf-1.0.3 lib/rocketamf/extensions.rb
mrpin-rocketamf-1.0.2 lib/rocketamf/extensions.rb
scalm-RocketAMF-1.0.0-x86_64-darwin-13 lib/rocketamf/extensions.rb
scalm-RocketAMF-1.0.0 lib/rocketamf/extensions.rb
RocketAMF-ouvrages-1.0.0 lib/rocketamf/extensions.rb
rocketamf_pure-1.0.0 lib/rocketamf/extensions.rb