Class: Icalendar::Values::Boolean

Inherits:
Icalendar::Value show all
Defined in:
lib/icalendar/values/boolean.rb

Instance Attribute Summary

Attributes inherited from Icalendar::Value

#ical_params

Instance Method Summary collapse

Methods inherited from Icalendar::Value

#ical_param, #params_ical, #to_ical, #value, value_type, #value_type

Constructor Details

#initialize(value, params = {}) ⇒ Boolean

Returns a new instance of Boolean.


6
7
8
# File 'lib/icalendar/values/boolean.rb', line 6

def initialize(value, params = {})
  super value.to_s.downcase == 'true', params
end

Instance Method Details

#value_icalObject


10
11
12
# File 'lib/icalendar/values/boolean.rb', line 10

def value_ical
  value ? 'TRUE' : 'FALSE'
end