Class: LocalGem::ConfigStruct
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- LocalGem::ConfigStruct
- Defined in:
- lib/local_gem.rb
Class Method Summary collapse
-
.block_to_hash(block = nil) ⇒ Object
Converts the data within the given block to hash.
Instance Method Summary collapse
-
#to_hash ⇒ Object
:nodoc:.
Class Method Details
.block_to_hash(block = nil) ⇒ Object
Converts the data within the given block to hash
68 69 70 71 72 73 74 75 76 |
# File 'lib/local_gem.rb', line 68 def self.block_to_hash(block=nil) config = self.new if block block.call(config) config.to_hash else {} end end |
Instance Method Details
#to_hash ⇒ Object
:nodoc:
78 79 80 |
# File 'lib/local_gem.rb', line 78 def to_hash #:nodoc: @table end |