Sha256: ac5ab66bdc5b645c9872b8cc685387c166e95d1de5a7ff9d072893ad98b0fa9d

Contents?: true

Size: 640 Bytes

Versions: 14

Compression:

Stored size: 640 Bytes

Contents

module Picasa
  module Presenter
    class Base
      include Utils

      attr_reader :parsed_body

      def initialize(parsed_body)
        @parsed_body = parsed_body
      end

      def inspect
        inspection = methods_to_inspect.map do |method|
          value = send(method)
          value = value.nil? ? "nil" : value.inspect
          "#{method}: #{value}"
        end.join(", ")
        "#<#{self.class} #{inspection}>"
      end

      private

      def methods_to_inspect
        # Ruby 1.8.7 workaround
        (public_methods - Object.methods).map { |m| m.to_sym } - [:parsed_body, :entries]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
picasa-0.6.7 lib/picasa/presenter/base.rb
picasa-0.6.6 lib/picasa/presenter/base.rb
picasa-0.6.5 lib/picasa/presenter/base.rb
picasa-0.6.4 lib/picasa/presenter/base.rb
picasa-0.6.3 lib/picasa/presenter/base.rb
picasa-0.6.2 lib/picasa/presenter/base.rb
picasa-0.6.1 lib/picasa/presenter/base.rb
picasa-0.6.0 lib/picasa/presenter/base.rb
picasa-0.5.4 lib/picasa/presenter/base.rb
picasa-0.5.3 lib/picasa/presenter/base.rb
picasa-0.5.2 lib/picasa/presenter/base.rb
picasa-0.5.1 lib/picasa/presenter/base.rb
picasa-0.5.0 lib/picasa/presenter/base.rb
picasa-0.4.2 lib/picasa/presenter/base.rb