Class: Hobix::LinkList
- Inherits:
-
BaseEntry
- Object
- BaseContent
- BaseEntry
- Hobix::LinkList
- Defined in:
- lib/hobix/linklist.rb
Instance Method Summary collapse
-
#content ⇒ Object
Converts the link list into a RedCloth string for display in templates.
-
#each ⇒ Object
Adds support for enumeration.
Methods inherited from BaseEntry
#content_ratings, inherited, #to_search
Methods inherited from BaseContent
#base_id, #canonical_tags, #day_id, #force_tags, #initialize, 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
This class inherits a constructor from Hobix::BaseContent
Instance Method Details
#content ⇒ Object
Converts the link list into a RedCloth string for display in templates.
54 55 56 57 58 59 60 |
# File 'lib/hobix/linklist.rb', line 54 def content RedCloth.new( @links.collect do |title, url| "* \"#{ title }\":#{ url }" end.join( "\n" ) ) end |
#each ⇒ Object
Adds support for enumeration.
63 64 65 |
# File 'lib/hobix/linklist.rb', line 63 def each @links.each { |title, url| yield title, url } end |