Module: Err::Acts::Textiled::InstanceMethods
- Defined in:
- lib/acts_as_textiled/base.rb
Instance Method Summary collapse
- #reload ⇒ Object
- #textiled ⇒ Object
- #textiled=(bool) ⇒ Object
- #textiled? ⇒ Boolean
- #textilize ⇒ Object
- #write_attribute(attr_name, value) ⇒ Object
Instance Method Details
#reload ⇒ Object
65 66 67 68 |
# File 'lib/acts_as_textiled/base.rb', line 65 def reload textiled.clear super end |
#textiled ⇒ Object
49 50 51 |
# File 'lib/acts_as_textiled/base.rb', line 49 def textiled textiled? ? (@textiled ||= {}) : @attributes.dup end |
#textiled=(bool) ⇒ Object
57 58 59 |
# File 'lib/acts_as_textiled/base.rb', line 57 def textiled=(bool) @is_textiled = !!bool end |
#textiled? ⇒ Boolean
53 54 55 |
# File 'lib/acts_as_textiled/base.rb', line 53 def textiled? @is_textiled != false end |
#textilize ⇒ Object
61 62 63 |
# File 'lib/acts_as_textiled/base.rb', line 61 def textilize self.class.textiled_attributes.each { |attr| __send__(attr) } end |
#write_attribute(attr_name, value) ⇒ Object
70 71 72 73 |
# File 'lib/acts_as_textiled/base.rb', line 70 def write_attribute(attr_name, value) textiled[attr_name.to_s] = nil super end |