Class: Turntabler::Snag

Inherits:
Resource show all
Defined in:
lib/turntabler/snag.rb

Overview

Represents a song that was snagged

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Method Summary

Methods inherited from Resource

#==, attribute, #attributes=, #hash, #initialize, #load, #loaded?, #pretty_print, #pretty_print_instance_variables

Methods included from Assertions

#assert_valid_keys, #assert_valid_values

Methods included from DigestHelpers

#digest

Constructor Details

This class inherits a constructor from Turntabler::Resource

Instance Attribute Details

#songTurntabler::Song (readonly)

The song that was snagged

Returns:



14
# File 'lib/turntabler/snag.rb', line 14

attribute :song

#userTurntabler::User (readonly)

The user who snagged the song

Returns:



8
9
10
# File 'lib/turntabler/snag.rb', line 8

attribute :user, :userid do |value|
  room.build_user(:_id => value)
end