@@ -73,7 +73,7 @@ module Has
7373 # @param [Symbol] resource_name_or_class The underlying resource name or a class to get it from
7474 # @param [Hash] class_level_options The options to pass to the method definition.
7575 def has ( resource_name_or_class , class_level_options = { } )
76- if klass = class_level_options . delete ( :class )
76+ if ( klass = class_level_options . delete ( :class ) )
7777 resource_name = resource_name_or_class
7878 else
7979 klass = resource_name_or_class
@@ -105,9 +105,9 @@ def define_has_getter(association)
105105
106106 # find and cache association
107107 instance_association = Association . new ( association . merge ( parent : self ) )
108- resource = if klass . respond_to? ( :find ) && resource_id = method_missing ( association [ :id_column ] )
108+ resource = if klass . respond_to? ( :find ) && ( resource_id = method_missing ( association [ :id_column ] ) )
109109 klass . find ( @client , id : resource_id , association : instance_association )
110- elsif found = method_missing ( association [ :name ] . to_sym )
110+ elsif ( found = method_missing ( association [ :name ] . to_sym ) )
111111 wrap_resource ( found , association , include_key : association [ :include_key ] )
112112 elsif klass . superclass == DataResource && !association [ :inline ]
113113 response = @client . connection . get ( instance_association . generate_path ( with_parent : true ) )
@@ -133,7 +133,7 @@ module HasMany
133133 # @param [Symbol] resource_name_or_class The underlying resource name or class to get it from
134134 # @param [Hash] class_level_options The options to pass to the method definition.
135135 def has_many ( resource_name_or_class , class_level_options = { } )
136- if klass = class_level_options . delete ( :class )
136+ if ( klass = class_level_options . delete ( :class ) )
137137 resource_name = resource_name_or_class
138138 else
139139 klass = resource_name_or_class
0 commit comments