Class: CalDAV::Filter::Property

Inherits:
Base
  • Object
show all
Defined in:
lib/caldav/filter.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#child, #parent

Instance Method Summary collapse

Methods inherited from Base

#to_xml

Constructor Details

#initialize(name, text, parent = nil) ⇒ Property

Returns a new instance of Property.



65
66
67
68
69
# File 'lib/caldav/filter.rb', line 65

def initialize(name, text, parent = nil)
  self.name = name
  self.text = text
  self.parent = parent
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



63
64
65
# File 'lib/caldav/filter.rb', line 63

def name
  @name
end

#textObject

Returns the value of attribute text.



63
64
65
# File 'lib/caldav/filter.rb', line 63

def text
  @text
end

Instance Method Details

#build_xml(xml) ⇒ Object



71
72
73
74
75
# File 'lib/caldav/filter.rb', line 71

def build_xml(xml)
  xml.tag! "cal:prop-filter", :name => self.name do
    xml.tag! "cal:text-match", self.text, :collation => "i;octet"
  end
end