Class: Hobix::IndexEntry

Inherits:
BaseContent show all
Defined in:
lib/hobix/storage/filesys.rb

Overview

The IndexEntry class

Direct Known Subclasses

BixWik::IndexEntry

Instance Method Summary collapse

Methods inherited from BaseContent

#base_id, #canonical_tags, #day_id, #force_tags, link_format, load, maker, #month_id, no_implicit_tags, #path_to_tags, root_tag=, #section_id, split_implicit_tags, #tags, text_processor, text_processor_fields, #to_yaml, #to_yaml_orig, url_link, yaml_type, #year_id

Methods included from BaseProperties

append_features, #property_map, #to_yaml_properties

Constructor Details

#initialize(entry, fields = self.class.properties.keys) {|_self| ... } ⇒ IndexEntry

Returns a new instance of IndexEntry.

Yields:

  • (_self)

Yield Parameters:



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/hobix/storage/filesys.rb', line 27

def initialize( entry, fields = self.class.properties.keys )
    fields.each do |field|
        val = if entry.respond_to? field
                  entry.send( field )
              elsif respond_to? "make_#{field}"
                  send( "make_#{field}", entry )
              else
                  :unset
              end
        send( "#{field}=", val )
    end
    yield self if block_given?
end