Module: Rcal::Value

Included in:
Duration::Parser, Period, Text::Parser, TimeOfDay::Parser
Defined in:
lib/rcal/value.rb

Overview

Module containing all of the Ical value types (BINARY, TIME, DURATION, etc.). RFC 2445 Section 4.3.

Defined Under Namespace

Classes: BinaryParser, BooleanParser, CalAddressParser, DateParser, DateTimeParser, Duration, FloatParser, IntegerParser, Parser, Period, Text, TimeOfDay, UriParser

Class Method Summary (collapse)

Class Method Details

+ (Object) parser(compliance_level)

Returns a Parser Registry capable of parsing all the canonical value types.



11
12
13
# File 'lib/rcal/value.rb', line 11

def self.parser(compliance_level)
  Rcal::Parser::Registry.new(compliance_level)
end

+ (Object) parser_for(value_type, compliance_level)

Returns a Parser capable of parsing Strings of type value_type.

Raises ArgumentError if value_type is not a known value type.

Raises:

  • (ArgumentError)


19
20
21
# File 'lib/rcal/value.rb', line 19

def self.parser_for(value_type, compliance_level)
  raise ArgumentError.new("#{value_type} is not a known value type")
end