Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,34 @@
= PropertyHash
The Property hash can be used an object in itself.
h = PropertyHash.new(:a=>1, :b=>2)
h[:a] #=> 1
h[:a] = 3
h[:a] #=> 3
Becuase the properties are fixed, if we try to set a key that is not present,
then we will get an error.
expect ArgumentError do
h[:x] = 5
end
The PropertyHash can also be used as a superclass.
class MyPropertyHash < PropertyHash
property :a, :default => 1
property :b, :default => 2
end
h = MyPropertyHash.new
h[:a] #=> 1
h[:a] = 3
h[:a] #=> 3
Again, if we try to set key that was not fixed, then we will get an error.
expect ArgumentError do
h[:x] = 5
end