class Maglove::Widget::V2
Public Instance Methods
render() { |self| ... }
click to toggle source
# File lib/maglove/widget.rb, line 48 def render(&block) haml_tag "#{identifier}-widget", widget_options do yield self if block_given? end end
widget_options()
click to toggle source
# File lib/maglove/widget.rb, line 35 def widget_options attributes = { widget: true } @options.each do |key, value| attributes[key.to_s.dasherize.to_s] = value end if attributes["padding"] attributes["padding"] = attributes["padding"].join(" ") else attributes["padding"] = "0 0 0 0" end attributes end