Class: Rews::Shape::ItemShape

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

Overview

models ItemShape used in Folder::BaseFolderId.find_item and Folder::BaseFolderId.get_item methods

Instance Attribute Summary

Attributes inherited from Base

#shape

Instance Method Summary collapse

Methods inherited from Base

#inspect

Methods included from Util

apply_namespace, camel_keys, camelize, camelize_qname, check_opts, rsxml_to_xml, single_error_check, strip_bang, tag_exception, with_error_check

Constructor Details

#initialize(shape) ⇒ ItemShape

Returns a new instance of ItemShape.



47
48
49
# File 'lib/rews/shape.rb', line 47

def initialize(shape)
  @shape = check_opts(ITEM_SHAPE_OPTS, shape)
end

Instance Method Details

#to_xmlObject



51
52
53
54
55
56
57
# File 'lib/rews/shape.rb', line 51

def to_xml
  Xml::write_shape(:ItemShape) do |xml|
    xml.t :BaseShape, shape[:base_shape]
    xml.t :IncludeMimeContent, shape[:include_mime_content] if shape[:include_mime_content]
    Xml::write_additional_properties(xml, shape[:additional_properties])
  end
end