Class: RailsBetterFilters::WeightedTopologicalSort::Edge
- Inherits:
-
Object
- Object
- RailsBetterFilters::WeightedTopologicalSort::Edge
- Defined in:
- lib/rails-better-filters/weighted_topological_sort.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #from?(node) ⇒ Boolean
-
#initialize(from, to) ⇒ Edge
constructor
A new instance of Edge.
- #to?(node) ⇒ Boolean
Constructor Details
#initialize(from, to) ⇒ Edge
Returns a new instance of Edge.
82 83 84 85 |
# File 'lib/rails-better-filters/weighted_topological_sort.rb', line 82 def initialize(from, to) @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
80 81 82 |
# File 'lib/rails-better-filters/weighted_topological_sort.rb', line 80 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
80 81 82 |
# File 'lib/rails-better-filters/weighted_topological_sort.rb', line 80 def to @to end |
Instance Method Details
#from?(node) ⇒ Boolean
91 92 93 |
# File 'lib/rails-better-filters/weighted_topological_sort.rb', line 91 def from?(node) @from == node.name end |
#to?(node) ⇒ Boolean
87 88 89 |
# File 'lib/rails-better-filters/weighted_topological_sort.rb', line 87 def to?(node) @to == node.name end |