Class: Icalendar::Values::Boolean
- Inherits:
-
Icalendar::Value
- Object
- SimpleDelegator
- Icalendar::Value
- Icalendar::Values::Boolean
- Defined in:
- lib/icalendar/values/boolean.rb
Constant Summary
Constants inherited from Icalendar::Value
Icalendar::Value::VALUE_TYPE_GSUB_REGEX_1, Icalendar::Value::VALUE_TYPE_GSUB_REGEX_2
Instance Attribute Summary
Attributes inherited from Icalendar::Value
Instance Method Summary collapse
-
#initialize(value, params = {}) ⇒ Boolean
constructor
A new instance of Boolean.
- #value_ical ⇒ Object
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.
8 9 10 |
# File 'lib/icalendar/values/boolean.rb', line 8 def initialize(value, params = {}) super value.to_s.downcase == 'true', params end |
Instance Method Details
#value_ical ⇒ Object
12 13 14 |
# File 'lib/icalendar/values/boolean.rb', line 12 def value_ical value ? 'TRUE' : 'FALSE' end |