Class: Migreazy::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/migreazy.rb

Direct Known Subclasses

Database, GitBranch, TextFile, WorkingCopy

Defined Under Namespace

Classes: Database, GitBranch, TextFile, WorkingCopy

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#migrationsObject (readonly)

Returns the value of attribute migrations.



117
118
119
# File 'lib/migreazy.rb', line 117

def migrations
  @migrations
end

Class Method Details

.new_from_command_line_arg(arg) ⇒ Object



109
110
111
112
113
114
115
# File 'lib/migreazy.rb', line 109

def self.new_from_command_line_arg(arg)
  if File.exist?(File.expand_path(arg))
    TextFile.new arg
  else
    GitBranch.new arg
  end
end