Skip to content

Commit 042206d

Browse files
author
Jack Casey
committed
Adhere to standardrb style
1 parent 6b59f8a commit 042206d

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/graphiti/resource.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ def links?
154154
end
155155

156156
def links(model)
157-
self.class.links.inject({}) do |memo, (name, blk)|
157+
self.class.links.each_with_object({}) do |(name, blk), memo|
158158
memo[name] = instance_exec(model, &blk)
159-
memo
160159
end
161160
end
162161
end

lib/graphiti/resource/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def config
200200
extra_attributes: {},
201201
sideloads: {},
202202
callbacks: {},
203-
links: {},
203+
links: {}
204204
}
205205
end
206206

spec/serialization_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ def classification
13901390

13911391
context "when specified" do
13921392
before do
1393-
resource.link :test_link do |model| "#{self.endpoint[:url]}/#{model.id}" end
1393+
resource.link :test_link do |model| "#{endpoint[:url]}/#{model.id}" end
13941394
end
13951395

13961396
it "links correctly" do

0 commit comments

Comments
 (0)