Class: LocalGem::ConfigStruct

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/local_gem.rb

Class Method Summary collapse

Instance Method Summary collapse

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_hashObject

:nodoc:



78
79
80
# File 'lib/local_gem.rb', line 78

def to_hash #:nodoc:
  @table
end