Class Hobix::BaseEntry
In: lib/hobix/base.rb
Parent: BaseContent

The BaseEntry class is the underlying class for all Hobix entries (i.e. the content for your website/blahhg.)

Methods

Public Class methods

[Source]

     # File lib/hobix/base.rb, line 459
459:     def self.inherited( sub )
460:         Weblog::add_entry_class( sub )
461:     end

Public Instance methods

[Source]

     # File lib/hobix/base.rb, line 457
457:     def  content_ratingscontent_ratings; @content_ratings || [:ham]; end

Build the searchable text

[Source]

     # File lib/hobix/base.rb, line 464
464:     def to_search
465:         self.class.properties.map do |name, opts|
466:             next unless opts
467:             val = instance_variable_get( "@#{ name }" )
468:             next unless val
469:             val = val.strftime "%Y-%m-%dT%H:%M:%S" if val.respond_to? :strftime
470:             case opts[:search]
471:             when :prefix
472:                 "#{ name }:" + val.to_s
473:             when :fulltext
474:                 val.to_s
475:             end
476:         end.compact.join "\n"
477:     end

[Validate]