Class: Migr8::BaseSkeleton
- Inherits:
-
Object
- Object
- Migr8::BaseSkeleton
- Defined in:
- lib/migr8.rb
Direct Known Subclasses
DBMS::MySQL::Skeleton, DBMS::PostgreSQL::Skeleton, DBMS::SQLite3::Skeleton
Instance Method Summary collapse
Instance Method Details
#render(mig, opts = {}) ⇒ Object
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/migr8.rb', line 596 def render(mig, opts={}) plain = opts[:plain] buf = "" buf << "# -*- coding: utf-8 -*-\n" buf << "\n" buf << "version: #{mig.version}\n" buf << "desc: #{mig.desc}\n" buf << "author: #{mig.}\n" buf << "vars:\n" buf << _section_vars(mig, opts) unless plain buf << "\n" buf << "up: |\n" buf << _section_up(mig, opts) unless plain buf << "\n" buf << "down: |\n" buf << _section_down(mig, opts) unless plain buf << "\n" return buf end |