Sha256: 4065d3c93e72e8d051db705fa544e9fab668e239db916d53bac34b66cd78c48d

Contents?: true

Size: 1.49 KB

Versions: 3

Compression:

Stored size: 1.49 KB

Contents

#### {% title "Zapamiętywanie danych" %}

# Pliki tekstowe

Sesja irb:

    :::ruby
    hash = { :one => 1, :two => 2, :colors => ["red", "green", "blue"] }
    require 'yaml'
    puts hash.to_yaml
    y_hash = hash.to_yaml
    new_hash = YAML.load(y_hash)
    new_hash == hash  #=> true

<b>You need a way</b> to automate the storage and retrieval of professional
and personal contacts (an address book), but you want it to be in
plain text so that you can edit the entries in a text editor as well
as alter them <i>programmatically</i>.

### Rozwiązanie

Zobacz, `/doc/...`


## Proste bazy danych

You want a simple contact manager, and you need to share the files
with someone who may not have access to YAML.

### Rozwiązanie

Our hypothetical YAML crisis provides a chance to look at a gdbm-based
solution. We'll aim for something that's as close as possible to
the YAML version of the contact manager, and the best way to guarantee
that closeness is to use a similar test suite.


## Stone: Dead-Simple Data Persistence

To może być ciekawe [Dead-Simple Data Persistence] [stone].

[stone]: http://stone.rubyforge.org/ "Dead-Simple Data Persistence"

For small applications, a database can be overkill for storing your
data in a consistent and organized manner. Therefore, Stone was built
to provide plug-and-play data persistence for any application or
framework. It is fast, and it is easy… therefore it is good.

Instalacja:

    sudo gem install stone

Czy to będzie działać z Sinatrą? Przykład: Fortunka?

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wbzyl-datamapper-tutorial-0.0.10 lib/views/using-plain-text-files-for-data-persistence.rdiscount
wbzyl-datamapper-tutorial-0.0.11 lib/views/using-plain-text-files-for-data-persistence.rdiscount
wbzyl-datamapper-tutorial-0.0.9 lib/views/using-plain-text-files-for-data-persistence.rdiscount