Sha256: 25ef4cd521053b98f865aa13dc6d84660371b2f6774b6a1862875b26ddb03d87
Contents?: true
Size: 746 Bytes
Versions: 13
Compression:
Stored size: 746 Bytes
Contents
module CukeModeler # A mix-in module containing methods used by models that represent an element that can be tagged. module Taggable # The models for tags which are directly assigned to the element attr_accessor :tags # Returns the models for tags which are indirectly assigned to the element (i.e. they # have been inherited from a parent element). def applied_tags parent_model.respond_to?(:all_tags) ? parent_model.all_tags : [] end # Returns models for all of the tags which are applicable to the element. def all_tags applied_tags + @tags end private def tag_output_string tags.collect { |tag| tag.name }.join(' ') end end end
Version data entries
13 entries across 13 versions & 1 rubygems