lib/rews/shape.rb in rews-0.1.0 vs lib/rews/shape.rb in rews-0.2.0
- old
+ new
@@ -22,21 +22,29 @@
end
end
end
end
+ # models ItemShape and FolderShape used in <tt>Folder::BaseFolderId.find_*</tt> and
+ # <tt>Folder::BaseFolderId.get_*</tt> methods
class Base
include Util
attr_reader :shape
+
+ def inspect
+ "#<#{self.class} @shape=#{@shape}>"
+ end
end
ITEM_SHAPE_OPTS = {
:base_shape=>:Default,
:include_mime_content=>nil,
:additional_properties=>nil
}
+ # models ItemShape used in <tt>Folder::BaseFolderId.find_item</tt> and
+ # <tt>Folder::BaseFolderId.get_item</tt> methods
class ItemShape < Base
def initialize(shape)
@shape = check_opts(ITEM_SHAPE_OPTS, shape)
end
@@ -52,9 +60,10 @@
FOLDER_SHAPE_OPTS = {
:base_shape=>:Default,
:additional_properties=>nil
}
+ # models +FolderShape+ used in <tt>Folder::BaseFolderId.find_folder</tt> method
class FolderShape < Base
def initialize(shape)
@shape = check_opts(FOLDER_SHAPE_OPTS, shape)
end