Skip to content

Commit

Permalink
Code style polishing microfix
Browse files Browse the repository at this point in the history
  • Loading branch information
etki committed Aug 4, 2017
1 parent ab10753 commit 1b79e4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/mapper/type/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

require_relative '../handler/attribute/validator'
require_relative '../mixin/errors'
require_relative '../mixin/reflection'
require_relative '../mixin/handler_support'
require_relative 'parameter'

Expand All @@ -14,6 +15,7 @@ class Type
# Stores data about single type attribute
class Attribute
include Mixin::Errors
include Mixin::Reflection
include Mixin::HandlerSupport

# @!attribute
Expand Down Expand Up @@ -91,7 +93,9 @@ def initialize(owner, name, *types, **options)
@types = validate_types!(types)
self.class.defaults.each do |key, value|
value = options.fetch(key, value)
send("#{key}=", options.fetch(key, value)) unless value.nil?
unless value.nil?
set_object_attribute(self, key, options.fetch(key, value))
end
end
end

Expand Down

0 comments on commit 1b79e4d

Please sign in to comment.