Sha256: 89e46eb99aea595de95572e41c0da48551e2e366c711ac41eaf3bc7280a0cf50

Contents?: true

Size: 361 Bytes

Versions: 11

Compression:

Stored size: 361 Bytes

Contents

module SocialNetworking
  # Allows for shareable items to be passed in to evaluate properties
  class Shareable
    def initialize(item = nil)
      @item = item
    end

    def action
      @item.try(:action) || "Shared"
    end

    def description
      @item.try(:shared_description) ||
        "Description not available for this item."
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
social_networking-0.11.8 app/models/social_networking/shareable.rb
social_networking-0.11.7 app/models/social_networking/shareable.rb
social_networking-0.11.6 app/models/social_networking/shareable.rb
social_networking-0.11.5 app/models/social_networking/shareable.rb
social_networking-0.11.4 app/models/social_networking/shareable.rb
social_networking-0.11.3 app/models/social_networking/shareable.rb
social_networking-0.11.2 app/models/social_networking/shareable.rb
social_networking-0.11.1 app/models/social_networking/shareable.rb
social_networking-0.11.0 app/models/social_networking/shareable.rb
social_networking-0.10.0 app/models/social_networking/shareable.rb
social_networking-0.9.3 app/models/social_networking/shareable.rb