Module: MyCore::OpenStruct::ClassMethods
- Defined in:
- lib/my_core/open_struct.rb
Instance Method Summary collapse
Instance Method Details
#block_to_hash(block = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/my_core/open_struct.rb', line 7 def block_to_hash(block=nil) config = self.new if block block.call(config) config.to_hash else {} end end |