Skip to content

Commit

Permalink
Document attributes= method
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Jan 17, 2024
1 parent af5271e commit 195861e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/datagrid/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def initialize(attributes = nil, &block)
end
end


# @return [Hash<Symbol, Object>] grid attributes including filter values and ordering values
def attributes
result = {}
Expand All @@ -151,6 +152,12 @@ def attributes
result
end

# Updates datagrid attributes with a passed hash argument
# @param attributes [Hash<Symbol, Object>]
def attributes=(attributes)
super(attributes)
end

# @return [Object] Any datagrid attribute value
def [](attribute)
self.public_send(attribute)
Expand Down

0 comments on commit 195861e

Please sign in to comment.