Sha256: f2eaf7b38fe884ea60304f5bd18f561ea9fc9fbe0d1434d8ed9a2a614cbbb940
Contents?: true
Size: 481 Bytes
Versions: 2
Compression:
Stored size: 481 Bytes
Contents
module Yaks class Mapper class Attribute include Attribs.new(:name, :block) include Util def self.create(name, _options = nil, &block) new(name: name, block: block) end def add_to_resource(resource, mapper, _context) if block attribute = Resolve(block, mapper) else attribute = mapper.load_attribute(name) end resource.merge_attributes(name => attribute) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yaks-0.11.0 | lib/yaks/mapper/attribute.rb |
yaks-0.10.0 | lib/yaks/mapper/attribute.rb |