class FlexStruct
A drop-in replacement for Struct which adds a more flexible initialize method
Constants
- VERSION
Public Class Methods
new(*args, &block)
click to toggle source
# File lib/flex_struct.rb, line 7 def self.new(*args, &block) Struct.new(*args) do module_eval(&block) if block # Insert our `initialize` method into the ancestors chain so it can be # overridden by `block` if necessary include Initializer end end