Class: Fleakr::Objects::Collection

Inherits:
Object
  • Object
show all
Includes:
Support::Object
Defined in:
lib/fleakr/objects/collection.rb

Overview

Collection

Attributes

id

The ID for this collection

title

The title of this collection

description

The description of this collection

small_icon_url

The URL for the small icon that represents this collection

large_icon_url

The URL for the large icon that represents this collection

Instance Method Summary collapse

Methods included from Support::Object

included

Instance Method Details

#collectionsObject

The collections associated with this collection



40
41
42
# File 'lib/fleakr/objects/collection.rb', line 40

def collections
  sibling_nodes_for('collection').map {|n| Collection.new(n) }
end

#created_atObject

When was this collection created?



28
29
30
# File 'lib/fleakr/objects/collection.rb', line 28

def created_at
  Time.at(created.to_i)
end

#setsObject

The sets associated with this collection



34
35
36
# File 'lib/fleakr/objects/collection.rb', line 34

def sets
  sibling_nodes_for('set').map {|n| Set.new(n) }
end