Class: Icalendar::Values::Uri

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

Direct Known Subclasses

CalAddress

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

#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 = {}) ⇒ Uri

Returns a new instance of Uri.



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

def initialize(value, params = {})
  parsed = URI.parse(value) rescue value
  super parsed, params
end

Instance Method Details

#value_icalObject



15
16
17
# File 'lib/icalendar/values/uri.rb', line 15

def value_ical
  value.to_s
end