Class: Ticard::LocalRepository
- Inherits:
-
Object
- Object
- Ticard::LocalRepository
show all
- Defined in:
- lib/ticard/local_repository.rb
Instance Method Summary
collapse
Instance Method Details
#get(card_path) ⇒ Object
4
5
6
7
|
# File 'lib/ticard/local_repository.rb', line 4
def get(card_path)
content = read(card_path)
Parser.new(content).parse
end
|
#put(card) ⇒ Object
9
10
11
12
|
# File 'lib/ticard/local_repository.rb', line 9
def put(card)
content = Serializer.new(card.as_stored).serialize
write(card) { |f| f << content }
end
|