Class: Thermos::Dependency
- Inherits:
-
Object
- Object
- Thermos::Dependency
- Defined in:
- lib/thermos/dependency.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(model:, ref:, path: nil) ⇒ Dependency
constructor
A new instance of Dependency.
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
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
5 6 7 |
# File 'lib/thermos/dependency.rb', line 5 def klass @klass end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/thermos/dependency.rb', line 5 def model @model end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/thermos/dependency.rb', line 5 def path @path end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
5 6 7 |
# File 'lib/thermos/dependency.rb', line 5 def table @table end |