class SimpleAttribute::Attributes::Link
Public Instance Methods
attribute_name()
click to toggle source
# File lib/simple_attribute/attributes/link.rb, line 4 def attribute_name 'link' end
label_method()
click to toggle source
# File lib/simple_attribute/attributes/link.rb, line 8 def label_method @options.fetch(:label, :titleize) end
render_attribute()
click to toggle source
# File lib/simple_attribute/attributes/link.rb, line 16 def render_attribute label = value.try(label_method) title = value.try(title_method) link_to label, value.to_s, html_options.merge(title: title) end
title_method()
click to toggle source
# File lib/simple_attribute/attributes/link.rb, line 12 def title_method @options.fetch(:title, :titleize) end