Class: Maglove::Widget::LegacyHorizontalRule

Inherits:
V1
  • Object
show all
Defined in:
lib/maglove/widget/horizontal_rule.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #scope

Instance Method Summary collapse

Methods inherited from V1

#drop_container, #widget_options

Methods inherited from Base

#initialize, #style_string, #widget_options

Constructor Details

This class inherits a constructor from Maglove::Widget::Base

Instance Method Details

#defaultsObject



21
22
23
24
25
26
27
# File 'lib/maglove/widget/horizontal_rule.rb', line 21

def defaults
  {
    style: 'solid',
    color: 'dark',
    max_height: 'inherit'
  }
end

#identifierObject



17
18
19
# File 'lib/maglove/widget/horizontal_rule.rb', line 17

def identifier
  "horizontal_rule"
end

#render(&block) ⇒ Object



29
30
31
32
33
# File 'lib/maglove/widget/horizontal_rule.rb', line 29

def render(&block)
  super do
    haml_tag :hr, style: "max-height: #{options[:max_height]}", class: "#{options[:style]} #{options[:color]}"
  end
end