Class: Transfer::Generators::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/transfer/generators/base.rb

Direct Known Subclasses

ActiveRecord, Mongoid, Sequel

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/transfer/generators/base.rb', line 8

def initialize klass
  @klass = klass
end

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



2
3
4
# File 'lib/transfer/generators/base.rb', line 2

def klass
  @klass
end

Class Method Details

.supports?(klass) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/transfer/generators/base.rb', line 4

def self.supports? klass
  raise "Not Yet Implemented!"
end

Instance Method Details

#afterObject



15
16
# File 'lib/transfer/generators/base.rb', line 15

def after
end

#beforeObject



12
13
# File 'lib/transfer/generators/base.rb', line 12

def before
end

#column_present?(name) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/transfer/generators/base.rb', line 22

def column_present? name
  klass.method_defined? name
end

#create(attributes, row, options = {}, callbacks = {}) ⇒ Object



18
19
20
# File 'lib/transfer/generators/base.rb', line 18

def create attributes, row, options={}, callbacks={}
  raise "Not Yet Implemented!"
end