Created
November 6, 2014 22:20
-
-
Save jeremyf/4ac46163af876673e5a7 to your computer and use it in GitHub Desktop.
Rudimentary prototype of the proposed Hydra::Works.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rudimentary prototype of the proposed Hydra::Works. | |
# | |
# The idea is to use modules to define the interface of our data-structures. | |
# This is following the [Lotus Philosophy](https://github.com/lotus/docs/blob/master/philosophy.md) | |
module Hydra::Works | |
module Work | |
def initialize | |
@files = [] | |
@members = [] | |
end | |
def files | |
@files | |
end | |
def members | |
@members | |
end | |
end | |
module File | |
def initialize(container) | |
@container = container | |
end | |
def container | |
@container | |
end | |
end | |
end | |
class Work | |
include Hydra::Works::Work | |
end | |
class File | |
include Hydra::Works::File | |
end |
Author
jeremyf
commented
Nov 7, 2014
- Work contains File
- AdminSet contains File
- File can only be contained by 1 object
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment