Class: Thermos::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/thermos/dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model:, ref:, path: nil) ⇒ Dependency

Returns a new instance of Dependency.



7
8
9
10
11
12
# File 'lib/thermos/dependency.rb', line 7

def initialize(model:, ref:, path: nil)
  @model = model
  @path = path
  @table = ref.table_name
  @klass = ref.class_name.constantize
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass.



5
6
7
# File 'lib/thermos/dependency.rb', line 5

def klass
  @klass
end

#modelObject (readonly)

Returns the value of attribute model.



5
6
7
# File 'lib/thermos/dependency.rb', line 5

def model
  @model
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/thermos/dependency.rb', line 5

def path
  @path
end

#tableObject (readonly)

Returns the value of attribute table.



5
6
7
# File 'lib/thermos/dependency.rb', line 5

def table
  @table
end