Class: NPR::Show
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
-
#program ⇒ Object
Returns the value of attribute program.
-
#segment ⇒ Object
Returns the value of attribute segment.
-
#show_date ⇒ Object
(also: #date)
Returns the value of attribute show_date.
Method Summary
Methods inherited from Content
Constructor Details
This class inherits a constructor from NPR::Content
Instance Attribute Details
#program ⇒ Object
Returns the value of attribute program.
14 15 16 |
# File 'lib/rubynpr/show.rb', line 14 def program @program end |
#segment ⇒ Object
Returns the value of attribute segment.
14 15 16 |
# File 'lib/rubynpr/show.rb', line 14 def segment @segment end |
#show_date ⇒ Object 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 |