_plugins/people.rb
# Before years, after shows and committees
Before years, after shows and committees
Before years after shows and committees
def last_year(data)
      if data and data.size > 0
        data.select! { |i| not i["item"].nil? }
        data.select! { |i| not i["item"].data["year_page"].nil? }
        if data.size > 0
          last_item = data[-1]["item"]
          last_year = last_item.data["year_page"]
          return last_year.data["grad_year"]
        end
      end
      return 0
    end
def last_year ( data ) if data and data . size > 0 data . select! { | i | not i [ "item" ] . nil? } data . select! { | i | not i [ "item" ] . data [ "year_page" ] . nil? } if data . size > 0 last_item = data [ - 1 ] [ "item" ] last_year = last_item . data [ "year_page" ] return last_year . data [ "grad_year" ] end end return 0 end
Before years, after shows and committees
Before years after shows and committees
# Return the last year someone worked at the theatre given a list of # shows or years # Filter the data set to only items with valid year_pages # If we have a valid item return its grad year # Data empty or no useful data
data
<not_specific>