Class: Rubicante::Type
- Inherits:
-
Object
- Object
- Rubicante::Type
- Defined in:
- lib/rubicante/type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ports ⇒ Object
Returns the value of attribute ports.
-
#services ⇒ Object
Returns the value of attribute services.
Instance Method Summary collapse
-
#initialize(name) ⇒ Type
constructor
A new instance of Type.
- #port(new_port) ⇒ Object
- #service(new_service) ⇒ Object
Constructor Details
#initialize(name) ⇒ Type
Returns a new instance of Type.
6 7 8 9 10 |
# File 'lib/rubicante/type.rb', line 6 def initialize(name) @name = name @ports = [] @services = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rubicante/type.rb', line 3 def name @name end |
#ports ⇒ Object
Returns the value of attribute ports.
4 5 6 |
# File 'lib/rubicante/type.rb', line 4 def ports @ports end |
#services ⇒ Object
Returns the value of attribute services.
4 5 6 |
# File 'lib/rubicante/type.rb', line 4 def services @services end |
Instance Method Details
#port(new_port) ⇒ Object
12 13 14 |
# File 'lib/rubicante/type.rb', line 12 def port(new_port) @ports << new_port end |
#service(new_service) ⇒ Object
16 17 18 |
# File 'lib/rubicante/type.rb', line 16 def service(new_service) @services << new_service end |