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.1.5 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.4 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.3 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.2 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.1 lib/cuboid/option_groups/datastore.rb
cuboid-0.1.0 lib/cuboid/option_groups/datastore.rb
cuboid-0.0.5 lib/cuboid/option_groups/datastore.rb
cuboid-0.0.4 lib/cuboid/option_groups/datastore.rb
cuboid-0.0.3 lib/cuboid/option_groups/datastore.rb
cuboid-0.0.3alpha lib/cuboid/option_groups/datastore.rb
cuboid-0.0.2alpha lib/cuboid/option_groups/datastore.rb
cuboid-0.0.1alpha lib/cuboid/option_groups/datastore.rb