Class: Blingee::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/blingee/entry.rb

Overview

An entry contains details and Blingee::Image instances for a single entry found on Blingee.com.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Entry

Returns a new instance of Entry.



11
12
13
14
15
16
# File 'lib/blingee/entry.rb', line 11

def initialize(attributes = {})
  @display_url  = attributes[:display_url]
  @id           = attributes[:id].to_i
  @images       = collect_images(attributes[:images])
  @name         = attributes[:name]
end

Instance Attribute Details

#display_urlObject (readonly)

Returns the value of attribute display_url.



9
10
11
# File 'lib/blingee/entry.rb', line 9

def display_url
  @display_url
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/blingee/entry.rb', line 9

def id
  @id
end

#imagesObject (readonly)

Returns the value of attribute images.



9
10
11
# File 'lib/blingee/entry.rb', line 9

def images
  @images
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/blingee/entry.rb', line 9

def name
  @name
end