Class: NPR::Show

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

Overview

More often than not, a Story was presented as part of an NPR show. If a Story was presented as part of a show, it can be accessed from a story’s show attribute. A Show has:

  • program - a hash with information about the program. Use @some_story.show.program[:name] to access the name of the show. @some_story.show.program[:id] accesses the ID of the show and @some_story.show.program[:code] is the NPR abbreviation for the given show

  • show_date - a DateTime object with the date of the show.

  • segment - the segment of the given show

Constant Summary collapse

PROGRAM_ATTRS =
[:id, :code]

Instance Attribute Summary collapse

Method Summary

Methods inherited from Content

#initialize

Constructor Details

This class inherits a constructor from NPR::Content

Instance Attribute Details

#programObject

Returns the value of attribute program.



14
15
16
# File 'lib/rubynpr/show.rb', line 14

def program
  @program
end

#segmentObject

Returns the value of attribute segment.



14
15
16
# File 'lib/rubynpr/show.rb', line 14

def segment
  @segment
end

#show_dateObject Also known as: date

Returns the value of attribute show_date.



14
15
16
# File 'lib/rubynpr/show.rb', line 14

def show_date
  @show_date
end