Class: ODDB::Html::View::Drugs::AtcGuidelinesComposite

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Includes:
AtcMethods, Snapback
Defined in:
lib/oddb/html/view/drugs/atc_guidelines.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => :snapback, 
  [0,1] => InlineSearch, 
  [0,2] => :atc_description,
  [0,3] => :atcs,
}
CSS_ID_MAP =
[ 'snapback', 'result-search', 'title' ]
CSS_MAP =
{ 0 => 'before-searchbar'}

Instance Method Summary collapse

Methods included from Snapback

#snapback

Methods included from AtcMethods

#atc_description

Instance Method Details

#atcs(model) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/oddb/html/view/drugs/atc_guidelines.rb', line 80

def atcs(model)
  list = [model]
  while(model = model.parent)
    list.unshift(model)
  end
  AtcGuidelineList.new(list, @session, self)
end