Rubyにこういうのが定期的に欲しくなる。定数だとstubしにくい・実装変えにくい。
class Module
def class_reader(name, value)
define_singleton_method(name) { value }
end
end
class Foo
class_reader :default_list, [:foo].freeze
end
Foo.default_list #=> [:foo]
We are pleased to announce the keynote speakers for Kaigi on Rails 2026! 🎉
・David Heinemeier Hansson @dhh
・Dave Thomas @pragdave
https://t.co/SEqaxhrhXI
#kaigionrails
Seeing Herb operate in an environment like GitHub feels like a huge milestone for the project and a really strong signal for the future of HTML-aware ERB tooling in Rails.
Very excited to keep pushing toward Herb 1.0 🚀
Read Joel's blog post here:
https://t.co/vjS7660ZXr