lib/scrivito/basic_obj.rb in scrivito_sdk-0.30.0.rc1 vs lib/scrivito/basic_obj.rb in scrivito_sdk-0.30.0

- old
+ new

@@ -482,16 +482,13 @@ # @api public # This method indicates if the Obj represents binary data. Binaries are # handled differently in that they are not rendered using the normal layout # but sent as a file. Examples of binary resources are Images or PDFs. # - # By default every Obj that has an attribute +blob+ of the type +binary+ is + # Every Obj that has an attribute +blob+ of the type +binary+ is # considered a binary # - # @note you can override this method to indicate that an Obj is binary, - # if the default behavior doesn't fit your needs - # # @return true if this Obj represents a binary resource. def binary? if obj_type = read_attribute('_obj_type') [:image, :generic].include?(obj_type.to_sym) else @@ -661,12 +658,12 @@ # @api public # This method is intended for Objs that represent binary resources like # images or pdf documents. If this Obj represents a binary file, an instance # of {Binary} is returned. - # The default implementation returns the attribute "blob" (if available and - # of type +binary+). - # @note You may override this method in your subclasses. + # + # This method returns the attribute +blob+ if it is of the type +binary+. + # # @return [Binary, nil] def binary self[:blob] if self[:blob].is_a?(Binary) end