Skip to content

Commit 195861e

Browse files
committed
Document attributes= method
1 parent af5271e commit 195861e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/datagrid/core.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def initialize(attributes = nil, &block)
142142
end
143143
end
144144

145+
145146
# @return [Hash<Symbol, Object>] grid attributes including filter values and ordering values
146147
def attributes
147148
result = {}
@@ -151,6 +152,12 @@ def attributes
151152
result
152153
end
153154

155+
# Updates datagrid attributes with a passed hash argument
156+
# @param attributes [Hash<Symbol, Object>]
157+
def attributes=(attributes)
158+
super(attributes)
159+
end
160+
154161
# @return [Object] Any datagrid attribute value
155162
def [](attribute)
156163
self.public_send(attribute)

0 commit comments

Comments
 (0)