Sha256: 9f0e0e59c3d370a44cb2de33b7ae6a6680458d05ad0a7a1db7eaa56476ce3644

Contents?: true

Size: 396 Bytes

Versions: 11

Compression:

Stored size: 396 Bytes

Contents

class LinkOracle
  class LinkData
    class Data
      attr_accessor :titles, :image_urls, :descriptions

      def assign(hash)
        hash.each {|key, value| self.send("#{key}=", value) }
        self
      end

      def image_url
        image_urls.first
      end

      def title
        titles.first
      end

      def description
        descriptions.first
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
link_oracle-0.1.2 lib/link_oracle/link_data/data.rb
link_oracle-0.1.1 lib/link_oracle/link_data/data.rb
link_oracle-0.1.0 lib/link_oracle/link_data/data.rb
link_oracle-0.0.8 lib/link_oracle/link_data/data.rb
link_oracle-0.0.7 lib/link_oracle/link_data/data.rb
link_oracle-0.0.6 lib/link_oracle/link_data/data.rb
link_oracle-0.0.5 lib/link_oracle/link_data/data.rb
link_oracle-0.0.4 lib/link_oracle/link_data/data.rb
link_oracle-0.0.3 lib/link_oracle/link_data/data.rb
link_oracle-0.0.2 lib/link_oracle/link_data/data.rb
link_oracle-0.0.1 lib/link_oracle/link_data/data.rb