Class: Jekyll::AttendeasePlugin::ScheduleDataParser
- Inherits:
-
Object
- Object
- Jekyll::AttendeasePlugin::ScheduleDataParser
- Defined in:
- lib/jekyll/attendease_plugin/schedule_data_parser.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
- #event ⇒ Object
- #filters ⇒ Object
-
#initialize(site) ⇒ ScheduleDataParser
constructor
A new instance of ScheduleDataParser.
- #presenters ⇒ Object
- #rooms ⇒ Object
- #sessions ⇒ Object
- #venues ⇒ Object
Constructor Details
#initialize(site) ⇒ ScheduleDataParser
Returns a new instance of ScheduleDataParser.
7 8 9 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 7 def initialize(site) @site = site end |
Instance Attribute Details
#site ⇒ Object
Returns the value of attribute site.
5 6 7 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 5 def site @site end |
Instance Method Details
#event ⇒ Object
11 12 13 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 11 def event site.config['attendease']['event'] end |
#filters ⇒ Object
55 56 57 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 55 def filters raw_filters end |
#presenters ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 15 def presenters @presenters ||= raw_presenters.each do |presenter| slug = Helpers.parameterize("#{presenter['first_name']} #{presenter['last_name']}") if slug == '' presenter['slug'] = presenter['id'] + '.html' else presenter['slug'] = slug + '.html' end end end |
#rooms ⇒ Object
37 38 39 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 37 def rooms raw_rooms end |
#sessions ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 41 def sessions @sessions ||= begin raw_sessions.each do |session| slug = Helpers.parameterize(session['name']) if site.config['attendease']['session_slug_uses_code'] || slug == '' session['slug'] = session['code'] + '.html' else session['slug'] = slug + '.html' end end (raw_sessions) end end |
#venues ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/jekyll/attendease_plugin/schedule_data_parser.rb', line 26 def venues @venues ||= raw_venues.each do |venue| slug = Helpers.parameterize(venue['name']) if slug == '' venue['slug'] = venue['id'] + '.html' else venue['slug'] = slug + '.html' end end end |