Sha256: d7522ada0fbaee7f585961731ac90da16bb779487fd44eda4e1381aad7b61508

Contents?: true

Size: 519 Bytes

Versions: 7

Compression:

Stored size: 519 Bytes

Contents

module Annotator
  module InitialDescription

    # Initial descriptions for rails specific columns
    class Rails < Base
      def check
        columns.keys.include? @column.to_sym
      end

      def columns
        {
          :id => "primary key", # TODO check if it actually is a primary key, find primary keys with other names
          :created_at => "creation time",
          :updated_at => "last update time" 
        }
      end

      def text
        columns[@column.to_sym]
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
annotator-0.0.10 lib/annotator/initial_description/rails.rb
annotator-0.0.9 lib/annotator/initial_description/rails.rb
annotator-0.0.8.1 lib/annotator/initial_description/rails.rb
annotator-0.0.8 lib/annotator/initial_description/rails.rb
annotator-0.0.7 lib/annotator/initial_description/rails.rb
annotator-0.0.6 lib/annotator/initial_description/rails.rb
annotator-0.0.5 lib/annotator/initial_description/rails.rb