Class: Gutentag::ActiveRecord

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

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ ActiveRecord

Returns a new instance of ActiveRecord.



8
9
10
# File 'lib/gutentag/active_record.rb', line 8

def initialize(model)
  @model = model
end

Class Method Details

.call(model) ⇒ Object



4
5
6
# File 'lib/gutentag/active_record.rb', line 4

def self.call(model)
  new(model).call
end

Instance Method Details

#callObject



12
13
14
15
16
17
# File 'lib/gutentag/active_record.rb', line 12

def call
  add_associations
  add_callbacks
  add_methods
  add_attribute
end