Skip to content

Commit

Permalink
boolean normalisation?
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Sep 23, 2017
1 parent e44ff7e commit e63714c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/vobject/vcalendar/propertyvalue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ def to_s
def to_hash
value
end

def to_norm
value.to_s.upcase
end
end

class Duration < Vobject::PropertyValue
Expand Down
4 changes: 2 additions & 2 deletions spec/examples/vcalendar/boolean1.norm.ics
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SEQUENCE:2
STATUS:NEEDS-ACTION
SUMMARY:Submit Income Taxes
UID:uid4@example.com
X-FALSE;VALUE="BOOLEAN":false
X-TRUE;VALUE="BOOLEAN":true
X-FALSE;VALUE="BOOLEAN":FALSE
X-TRUE;VALUE="BOOLEAN":TRUE
END:VTODO
END:VCALENDAR

0 comments on commit e63714c

Please sign in to comment.