class MarkupAttributes::MarkupType
The type used by ActiveRecord's attributes API @private
Public Class Methods
inspect()
click to toggle source
# File lib/markup_attributes.rb, line 48 def self.inspect "<MarkupType [#{markup_options}]>" end
Public Instance Methods
cast(value)
click to toggle source
Calls superclass method
# File lib/markup_attributes.rb, line 54 def cast(value) if value.is_a?(String) || value.is_a?(MarkupString) MarkupString.new(value).tap { |s| s.markup_options = self.markup_options } else super end end