Class: NPR::Image

Inherits:
Content show all
Defined in:
lib/rubynpr/image.rb

Overview

Some NPR stories include images. Images have as attributes:

  • <tt>id<tt> - a unique NPR identifier

  • type - TBD

  • caption

  • width - the width of the image in pixels

  • src - the source URL for the image

  • border - indicates if an image has a border

  • title

  • link - the URL to which the image links

  • producer - source who will receive credit for the image

  • provider - the owner or provider of the image, which may be independent of the producer

  • copyright - copyright year

Instance Attribute Summary collapse

Method Summary

Methods inherited from Content

#initialize

Constructor Details

This class inherits a constructor from NPR::Content

Instance Attribute Details

#borderObject

Returns the value of attribute border.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def border
  @border
end

#captionObject

Returns the value of attribute caption.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def caption
  @caption
end

Returns the value of attribute copyright.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def copyright
  @copyright
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def id
  @id
end

Returns the value of attribute link.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def link
  @link
end

#producerObject

Returns the value of attribute producer.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def producer
  @producer
end

#providerObject

Returns the value of attribute provider.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def provider
  @provider
end

#srcObject Also known as: source

Returns the value of attribute src.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def src
  @src
end

#titleObject

Returns the value of attribute title.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def title
  @title
end

#typeObject

Returns the value of attribute type.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def type
  @type
end

#widthObject

Returns the value of attribute width.



17
18
19
# File 'lib/rubynpr/image.rb', line 17

def width
  @width
end