mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 05:08:09 +08:00
DEV: Remove hash-like access from service contracts
We decided to keep only one way to access values from a contract. This patch thus removes the hash-like access from contracts.
This commit is contained in:

committed by
Loïc Guitaut

parent
4d0ed2e146
commit
2f334964f2
@ -17,10 +17,6 @@ class Service::ContractBase
|
||||
@__options__
|
||||
end
|
||||
|
||||
def [](key)
|
||||
public_send(key)
|
||||
end
|
||||
|
||||
def to_hash
|
||||
attributes.symbolize_keys
|
||||
end
|
||||
|
Reference in New Issue
Block a user