Sha256: 70315d5ecb108b7ec70eff8d080e4b8037e3411c6d101ba33eb9f96cea6fb6b9

Contents?: true

Size: 437 Bytes

Versions: 32

Compression:

Stored size: 437 Bytes

Contents

require 'ostruct'

module Cuboid::OptionGroups

# Generic OpenStruct-based class for general purpose data storage.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
class Datastore < Cuboid::OptionGroup

    def initialize
        @source = OpenStruct.new
    end

    def method_missing( method, *args, &block )
        @source.send( method, *args, &block )
    end

    def to_h
        @source.marshal_dump
    end

end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
cuboid-0.2.11 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.10 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.9 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.8 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.7 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.6 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.5 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.4.2 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.4.1 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.4 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.3 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.2 lib/cuboid/option_groups/datastore.rb
cuboid-0.2.1 lib/cuboid/option_groups/datastore.rb
cuboid-0.2 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.9.1 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.9 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.8 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.7 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.6.1 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.6 lib/cuboid/option_groups/datastore.rb