Sha256: 0869352f4298ee0dc5aebf9d4306266986196a4ddd2112d40c9ab4725ca51045

Contents?: true

Size: 494 Bytes

Versions: 18

Compression:

Stored size: 494 Bytes

Contents

require 'twitter/base'

module Twitter
  class Size < Twitter::Base
    attr_reader :h, :resize, :w
    alias height h
    alias width w

    # @param other [Twitter::Size]
    # @return [Boolean]
    def ==(other)
      super || size_equal(other) || attrs_equal(other)
    end

  protected

    # @param other [Twitter::Size]
    # @return [Boolean]
    def size_equal(other)
      self.class == other.class && !other.h.nil? && h == other.h && !other.w.nil? && w == other.w
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
twitter-4.8.1 lib/twitter/size.rb
twitter-4.8.0 lib/twitter/size.rb
twitter-4.7.0 lib/twitter/size.rb
twitter-4.6.2 lib/twitter/size.rb
twitter-4.6.1 lib/twitter/size.rb
twitter-4.6.0 lib/twitter/size.rb
twitter-4.5.0 lib/twitter/size.rb
twitter-4.4.4 lib/twitter/size.rb
twitter-4.4.3 lib/twitter/size.rb
twitter-4.4.2 lib/twitter/size.rb
twitter-4.4.1 lib/twitter/size.rb
twitter-4.4.0 lib/twitter/size.rb
twitter-4.3.0 lib/twitter/size.rb
twitter-4.2.0 lib/twitter/size.rb
twitter-4.1.2 lib/twitter/size.rb
twitter-4.1.1 lib/twitter/size.rb
twitter-4.1.0 lib/twitter/size.rb
twitter-4.0.0 lib/twitter/size.rb