Sha256: cd7f22d615ef3015de8b62f62f899c190b21b86443f8b3fa9a4ae754c541b6d0

Contents?: true

Size: 248 Bytes

Versions: 22

Compression:

Stored size: 248 Bytes

Contents

require 'ostruct'

class Hirb::HashStruct < OpenStruct #:nodoc:
  def self.block_to_hash(block=nil)
    config = self.new
    if block
      block.call(config)
      config.to_hash
    else
      {}
    end
  end

  def to_hash
    @table
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
Chrononaut-hirb-0.2.1 lib/hirb/hash_struct.rb
Chrononaut-hirb-0.2.3 lib/hirb/hash_struct.rb
cldwalker-hirb-0.1.0 lib/hirb/hash_struct.rb
cldwalker-hirb-0.1.1 lib/hirb/hash_struct.rb
cldwalker-hirb-0.1.2 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.0 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.1 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.2 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.3 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.4 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.5 lib/hirb/hash_struct.rb
cldwalker-hirb-0.2.6 lib/hirb/hash_struct.rb
hirb-0.2.10 lib/hirb/hash_struct.rb
hirb-0.2.9 lib/hirb/hash_struct.rb
hirb-0.2.8 lib/hirb/hash_struct.rb
hirb-0.2.7 lib/hirb/hash_struct.rb
hirb-0.2.6 lib/hirb/hash_struct.rb
hirb-0.2.2 lib/hirb/hash_struct.rb
hirb-0.2.3 lib/hirb/hash_struct.rb
hirb-0.2.4 lib/hirb/hash_struct.rb