Sha256: ce8880f3cecf4ec745246d3151f8744ab93d347816acce5a2ecb5265b25faacc
Contents?: true
Size: 557 Bytes
Versions: 67
Compression:
Stored size: 557 Bytes
Contents
# encoding: utf-8 class MenuBuilder def initialize @elements = [] end def dropdown(text,icon,submenu) @elements << { :type => 'dropdown' , :text => text, :icon => icon, :link => submenu } return self end def link(text,icon,link,target) @elements << { :type => 'link' , :text => text, :icon => icon, :link => link, :target => target } return self end def modal(text,icon,link) @elements << { :type => 'modal' , :text => text, :icon => icon, :link => link } return self end def build @elements end end
Version data entries
67 entries across 67 versions & 1 rubygems