lib/picky/sources/base.rb in picky-0.11.2 vs lib/picky/sources/base.rb in picky-0.12.0

- old
+ new

@@ -8,26 +8,13 @@ # # * connect_backend: Optional, called once for each type/category pair. # * take_snapshot: Optional, called once for each type. class Base - # Note: Methods listed for illustrative purposes. + # Note: Default methods do nothing. # - # Called by the indexer when gathering data. - # - # Yields the data (id, text for id) for the given type and field. - # - # When implementing or overriding your own, - # be sure to <tt>yield</tt> (or <tt>block.call</tt>) an id (as string or integer) - # and a corresponding text for the given type symbol and - # category symbol. - # - def harvest type, category - # yields nothing - end - # Connect to the backend. # # Note: Called once per index/category combination # before harvesting. # @@ -43,9 +30,22 @@ # # Note: Called before harvesting. # def take_snapshot type + end + + # Called by the indexer when gathering data. + # + # Yields the data (id, text for id) for the given type and category. + # + # When implementing or overriding your own, + # be sure to <tt>yield</tt> (or <tt>block.call</tt>) an id (as string or integer) + # and a corresponding text for the given type symbol and + # category symbol. + # + def harvest type, category + # yields nothing end end end \ No newline at end of file