Sha256: d6e5881e17762256234fdffd36cbd03f1506f1205add47ee02344d32014d5d93
Contents?: true
Size: 708 Bytes
Versions: 3
Compression:
Stored size: 708 Bytes
Contents
module LatoView class Layout::Actionbar::Cell < Cell @@widget_align = %(left right) # NB: widgets must be an array of hash {component: 'component', align: 'align'} attr_accessor :title, :widgets def initialize(title: '', widgets: []) # save params @title = title @widgets = widgets # check params check_params end def show render 'show.html' end private def check_params raise 'Actionbar Cell: widgets must be an array' unless @widgets.is_a? Array widgets.each do |widget| raise 'Actionbar Cell: widget align is not a correct value' unless @@widget_align.include? widget[:align].to_s end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lato_view-1.1.5 | app/cells/lato_view/layout/actionbar/cell.rb |
lato_view-1.1.4 | app/cells/lato_view/layout/actionbar/cell.rb |
lato_view-1.1.3 | app/cells/lato_view/layout/actionbar/cell.rb |