Class: Rews::Restriction
- Inherits:
-
Object
- Object
- Rews::Restriction
- Defined in:
- lib/rews/restriction.rb
Overview
models Restrictions for find_*
operations on Folder::BaseFolderId
takes restrictions written in Ruby s-expressions and outputs Exchange Web Services Restriction XML. e.g.
[[:and, [:==, "item:Subject", "hello"], [:>=, "item:DateTimeSent", DateTime.parse("2011-03-16T15:57:37+00:00")]]
Defined Under Namespace
Modules: Xml
Instance Attribute Summary collapse
-
#expr ⇒ Object
readonly
Returns the value of attribute expr.
Instance Method Summary collapse
-
#initialize(expr) ⇒ Restriction
constructor
A new instance of Restriction.
- #inspect ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(expr) ⇒ Restriction
Returns a new instance of Restriction.
13 14 15 |
# File 'lib/rews/restriction.rb', line 13 def initialize(expr) @expr = expr end |
Instance Attribute Details
#expr ⇒ Object (readonly)
Returns the value of attribute expr.
11 12 13 |
# File 'lib/rews/restriction.rb', line 11 def expr @expr end |
Instance Method Details
#inspect ⇒ Object
17 18 19 |
# File 'lib/rews/restriction.rb', line 17 def inspect "#<#{self.class} @expr=#{@expr.inspect}>" end |
#to_xml ⇒ Object
21 22 23 |
# File 'lib/rews/restriction.rb', line 21 def to_xml Xml::write_restriction(expr) end |