Class: Rews::SortOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/rews/sort_order.rb

Overview

models SortOrder used in Folder::BaseFolderId.find_* methods

takes sort_orders written in Ruby s-expressions and outputs EWS SortOrder XML e.g.

[["item:DateTimeReceived", "Ascending"], ["item:Size", "Descending"]]

Defined Under Namespace

Modules: Xml

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expr) ⇒ SortOrder

Returns a new instance of SortOrder.



11
12
13
# File 'lib/rews/sort_order.rb', line 11

def initialize(expr)
  @expr=expr
end

Instance Attribute Details

#exprObject (readonly)

Returns the value of attribute expr.



9
10
11
# File 'lib/rews/sort_order.rb', line 9

def expr
  @expr
end

Instance Method Details

#inspectObject



15
16
17
# File 'lib/rews/sort_order.rb', line 15

def inspect
  "#<#{self.class} @expr=#{@expr.inspect}>"
end

#to_xmlObject



19
20
21
# File 'lib/rews/sort_order.rb', line 19

def to_xml
  Xml::write_sort_order(expr)
end