Class: Spider::Model::SortTask
Overview
Helper class for sorting models
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #<<(model) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(model) ⇒ SortTask
constructor
A new instance of SortTask.
- #inspect ⇒ Object
Constructor Details
#initialize(model) ⇒ SortTask
441 442 443 444 |
# File 'lib/spiderfw/model/model.rb', line 441 def initialize(model) @model = model @dependencies = [] end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
439 440 441 |
# File 'lib/spiderfw/model/model.rb', line 439 def dependencies @dependencies end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
439 440 441 |
# File 'lib/spiderfw/model/model.rb', line 439 def model @model end |
Instance Method Details
#<<(model) ⇒ Object
446 447 448 |
# File 'lib/spiderfw/model/model.rb', line 446 def <<(model) @dependencies << model end |
#eql?(other) ⇒ Boolean
450 451 452 |
# File 'lib/spiderfw/model/model.rb', line 450 def eql?(other) @model == other.model end |
#inspect ⇒ Object
454 455 456 |
# File 'lib/spiderfw/model/model.rb', line 454 def inspect "#{@model.name} -> (#{dependencies.map{|d| d.model.name }.join(', ')})" end |