Class: FlattenRecord::Meta::MethodColumn

Inherits:
Column
  • Object
show all
Defined in:
lib/flatten_record/meta/method_column.rb

Instance Attribute Summary

Attributes inherited from Column

#column

Attributes inherited from Node

#children, #model, #parent, #target_model

Instance Method Summary collapse

Methods inherited from Column

#denormalize, #name, #nullify, #type

Methods inherited from Node

#prefix, #traverse_by

Constructor Details

#initialize(parent, method, type, target_model, model, options = {}) ⇒ MethodColumn

Returns a new instance of MethodColumn.



4
5
6
7
8
9
10
# File 'lib/flatten_record/meta/method_column.rb', line 4

def initialize(parent, method, type, target_model, model, options={})
  @column = Struct.
    new(:name, :default, :type, :null).
    new(method, options[:default], type, options[:null])

  super(parent, @column, target_model, model) 
end