Sha256: 10a2b0d98e24005c65da11c8aabad35dafc4f8e4e7593ebfcf4e5e16356c1c85
Contents?: true
Size: 669 Bytes
Versions: 19
Compression:
Stored size: 669 Bytes
Contents
module Lhm # Abstracts the details of a table column definition when specified with a type # as a symbol. This is the regular ActiveRecord's #add_column syntax: # # add_column :tablenames, :field, :string # class ColumnWithType # Constructor # # @param name [String, Symbol] # @param definition [Symbol] def initialize(name, definition) @name = name @definition = definition end # Returns the column data as an Array to be used with the splat operator. # See Lhm::Adaper#add_column # # @return [Array] def attributes [definition] end private attr_reader :definition end end
Version data entries
19 entries across 19 versions & 2 rubygems