Class: GhettoNotes::NotesDirectory
- Inherits:
-
Object
- Object
- GhettoNotes::NotesDirectory
- Defined in:
- lib/ghetto_notes/notes_directory.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Instance Method Summary collapse
-
#initialize(dir) ⇒ NotesDirectory
constructor
A new instance of NotesDirectory.
- #sync ⇒ Object
Constructor Details
#initialize(dir) ⇒ NotesDirectory
Returns a new instance of NotesDirectory.
5 6 7 |
# File 'lib/ghetto_notes/notes_directory.rb', line 5 def initialize(dir) @dir = dir end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
3 4 5 |
# File 'lib/ghetto_notes/notes_directory.rb', line 3 def dir @dir end |
Instance Method Details
#sync ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/ghetto_notes/notes_directory.rb', line 9 def sync Dir.chdir(dir) system('git pull origin master') system('git add .') system('git commit -m "ghetto notes: add latest changes"') system('git push') end |