Class: ActiveRecord::Bixformer::Attribute::String

Inherits:
Base
  • Object
show all
Defined in:
lib/activerecord-bixformer/attribute/string.rb

Instance Attribute Summary

Attributes inherited from Base

#model, #name, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #should_be_included

Constructor Details

This class inherits a constructor from ActiveRecord::Bixformer::Attribute::Base

Instance Method Details

#export(record) ⇒ Object



5
6
7
# File 'lib/activerecord-bixformer/attribute/string.rb', line 5

def export(record)
  record_attribute_value(record).to_s
end

#import(value) ⇒ Object



9
10
11
# File 'lib/activerecord-bixformer/attribute/string.rb', line 9

def import(value)
  value.to_s.strip.presence
end