Class: ActiveGraph::Migration
- Inherits:
-
Object
- Object
- ActiveGraph::Migration
- Defined in:
- lib/active_graph/migration.rb
Direct Known Subclasses
Defined Under Namespace
Classes: AddIdProperty
Instance Method Summary collapse
- #default_path ⇒ Object
- #joined_path(path) ⇒ Object
- #migrate ⇒ Object
- #output(string = '') ⇒ Object
- #print_output(string) ⇒ Object
- #query(*args) ⇒ Object
- #setup ⇒ Object
Instance Method Details
#default_path ⇒ Object
15 16 17 |
# File 'lib/active_graph/migration.rb', line 15 def default_path Rails.root if defined? Rails end |
#joined_path(path) ⇒ Object
19 20 21 |
# File 'lib/active_graph/migration.rb', line 19 def joined_path(path) File.join(path.to_s, 'db', 'neo4j-migrate') end |
#migrate ⇒ Object
3 4 5 |
# File 'lib/active_graph/migration.rb', line 3 def migrate fail 'not implemented' end |
#output(string = '') ⇒ Object
7 8 9 |
# File 'lib/active_graph/migration.rb', line 7 def output(string = '') puts string unless !!ENV['MIGRATIONS_SILENCED'] end |
#print_output(string) ⇒ Object
11 12 13 |
# File 'lib/active_graph/migration.rb', line 11 def print_output(string) print string unless !!ENV['MIGRATIONS_SILENCED'] end |
#query(*args) ⇒ Object
27 28 29 |
# File 'lib/active_graph/migration.rb', line 27 def query(*args) ActiveGraph::Base.query(*args) end |
#setup ⇒ Object
23 24 25 |
# File 'lib/active_graph/migration.rb', line 23 def setup FileUtils.mkdir_p('db/neo4j-migrate') end |