Class: PactBroker::UI::ViewModels::Relationships
- Inherits:
-
Object
- Object
- PactBroker::UI::ViewModels::Relationships
- Defined in:
- lib/pact_broker/ui/view_models/relationships.rb
Instance Attribute Summary collapse
-
#relationships ⇒ Object
readonly
Returns the value of attribute relationships.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(relationships) ⇒ Relationships
constructor
A new instance of Relationships.
Constructor Details
#initialize(relationships) ⇒ Relationships
Returns a new instance of Relationships.
10 11 12 |
# File 'lib/pact_broker/ui/view_models/relationships.rb', line 10 def initialize relationships @relationships = relationships.collect{ |relationship| Relationship.new(relationship) }.sort end |
Instance Attribute Details
#relationships ⇒ Object (readonly)
Returns the value of attribute relationships.
8 9 10 |
# File 'lib/pact_broker/ui/view_models/relationships.rb', line 8 def relationships @relationships end |
Instance Method Details
#each(&block) ⇒ Object
14 15 16 |
# File 'lib/pact_broker/ui/view_models/relationships.rb', line 14 def each(&block) relationships.each(&block) end |