lib/st_html/ruing/abstract_container.rb
#
# Setting :transparent => true makes this container act as a simple rendering 
# container that will have no influence on the name of the contained 
# elements.
# 
# Important note: it's not possible set a container transparent after 
# creation, because this property determines a behavior of the contained 
# items, so it would be possible to set transparent also a container that 
# already contains items, but in the latter case the items aren't updated
# accordingly. This could be handled resyncing sub-items recoursively but 
# this would be more complex, so for simplicity we set up thing in this way.
# Perhaps if needed in the future we will make things more flexible.
#
Setting :transparent => true makes this container act as a simple rendering
container that will have no influence on the name of the contained
elements.

Important note: it's not possible set a container transparent after
creation, because this property determines a behavior of the contained
items, so it would be possible to set transparent also a container that
already contains items, but in the latter case the items aren't updated
accordingly. This could be handled resyncing sub-items recoursively but
this would be more complex, so for simplicity we set up thing in this way.
Perhaps if needed in the future we will make things more flexible.
Setting : transparent = > true makes this container act as a simple rendering container that will have no influence on the name of the contained elements . Important note : it ' s not possible set a container transparent after creation because this property determines a behavior of the contained items so it would be possible to set transparent also a container that already contains items but in the latter case the items aren ' t updated accordingly . This could be handled resyncing sub - items recoursively but this would be more complex so for simplicity we set up thing in this way . Perhaps if needed in the future we will make things more flexible .
def items name_or_index=nil
        return @items if name_or_index.nil?
        if name_or_index.is_a? Integer
          return @items[name_or_index]
        end
        for i in 0...@items.size do
            return @items[i] if @items[i].name.eql? name_or_index.to_s
        end
        raise StHtml::Ruing::Exception, \
            "Item not found. #{name_or_index}" 
    end
def items name_or_index = nil return @items if name_or_index . nil? if name_or_index . is_a? Integer return @items [ name_or_index ] end for i in 0 ... @items . size do return @items [ i ] if @items [ i ] . name . eql? name_or_index . to_s end raise StHtml :: Ruing :: Exception , "Item not found. #{name_or_index}" end
Setting :transparent => true makes this container act as a simple rendering
container that will have no influence on the name of the contained
elements.
Setting : transparent = > true makes this container act as a simple rendering container that will have no influence on the name of the contained elements .
# when receiving an index is easy...
name_or_index
<not_specific>