Module: Utusemi::Core::InstanceMethods
- Includes:
- Base
- Defined in:
- lib/utusemi/core.rb
Overview
用途
Utusemi.config.map
使用例
Utusemi.config do
map :product do
name :title
end
end
product = Product.first
product.name
#=> NoMethodError: undefined method `name' for #<Product:...>
product.utusemi(:product).name
#=> 'test product'
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#changed ⇒ Object
110 111 112 113 |
# File 'lib/utusemi/core.rb', line 110 def changed return super unless utusemi_values[:flag] super + super.map { |column_name| unmapped_utusemi_column_name(column_name).to_s } end |
#utusemi!(obj = nil, options = {}) ⇒ Object
106 107 108 |
# File 'lib/utusemi/core.rb', line 106 def utusemi!(obj = nil, = {}) super.tap { utusemi_columns_mapper if obj.class.in? [Symbol, String] } end |