Class: Weasyl::MediaItem
- Inherits:
-
Object
- Object
- Weasyl::MediaItem
- Defined in:
- lib/weasyl/media.rb
Overview
Base class for media items
Instance Attribute Summary collapse
-
#id ⇒ Integer
readonly
Media ID of this item.
-
#links ⇒ Array<Weasyl::Link>
readonly
Links to other media.
-
#url ⇒ URI
readonly
Media URL to thumbnail.
Instance Method Summary collapse
-
#id? ⇒ Boolean
Indicator of if this MediaItem has an ID or not.
-
#initialize(item) ⇒ MediaItem
constructor
Shared initializer for all Media items.
-
#links? ⇒ Boolean
Indicator of if this MediaItem object has links or not.
Constructor Details
Instance Attribute Details
#id ⇒ Integer (readonly)
Returns Media ID of this item.
74 75 76 |
# File 'lib/weasyl/media.rb', line 74 def id @id end |
#links ⇒ Array<Weasyl::Link> (readonly)
Returns Links to other media.
81 82 83 |
# File 'lib/weasyl/media.rb', line 81 def links @links end |
#url ⇒ URI (readonly)
Returns Media URL to thumbnail.
77 78 79 |
# File 'lib/weasyl/media.rb', line 77 def url @url end |
Instance Method Details
#id? ⇒ Boolean
Indicator of if this MediaItem has an ID or not
99 100 101 |
# File 'lib/weasyl/media.rb', line 99 def id? !@id.nil? end |
#links? ⇒ Boolean
Indicator of if this MediaItem object has links or not
107 108 109 |
# File 'lib/weasyl/media.rb', line 107 def links? !@links.nil? end |