aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/events.rb2
-rw-r--r--lib/i18n.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/events.rb b/lib/events.rb
index 24404f1..055b9c2 100644
--- a/lib/events.rb
+++ b/lib/events.rb
@@ -15,7 +15,7 @@ module Events
@duration = attrs['duration'].to_i
@title = attrs['title']
@venue = attrs['venue']
- @image_url = attrs['image'] unless attrs['image'].length < 10
+ @image_url = attrs['image'] unless attrs['image'].nil? or attrs['image'].length < 10
@info_link = attrs['info_link']
end
diff --git a/lib/i18n.rb b/lib/i18n.rb
new file mode 100644
index 0000000..0a2e461
--- /dev/null
+++ b/lib/i18n.rb
@@ -0,0 +1,8 @@
+class I18n
+
+ Weekday = %w{søndag mandag tirsdag onsdag torsdag fredag lørdag}
+
+ def weekday(day)
+ Weekday[day]
+ end
+end