Sha256: 5acdaa6d7019ae7a677bdf9cecf9a15f7607219ab98ba17150487b17f03bc893

Contents?: true

Size: 409 Bytes

Versions: 9

Compression:

Stored size: 409 Bytes

Contents

require 'avatar/source/abstract_source'

module Avatar # :nodoc:
  module Source # :nodoc:
    # A really dumb implementation that never returns a URL.
    # Can be helpful for testing.  Also used in GravatarSource::default_source.
    class NilSource
      include AbstractSource
      
      # Always returns nil.
      def avatar_url_for(person, options = {})
        nil
      end
      
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
gcnovus-avatar-0.0.7 lib/avatar/source/nil_source.rb
gcnovus-avatar-0.2.0 lib/avatar/source/nil_source.rb
krasivotokak-avatar-0.0.7 lib/avatar/source/nil_source.rb
avatar-0.2.0 lib/avatar/source/nil_source.rb
avatar-0.0.5 lib/avatar/source/nil_source.rb
avatar-0.0.3 lib/avatar/source/nil_source.rb
avatar-0.0.4 lib/avatar/source/nil_source.rb
avatar-0.0.1 lib/avatar/source/nil_source.rb
avatar-0.0.2 lib/avatar/source/nil_source.rb