Class: RRT_RUBY::RRTDeployment::Processor
- Inherits:
-
RRT_RUBY::RRTGeneric::Element
- Object
- RRT_RUBY::RRTGeneric::Element
- RRT_RUBY::RRTDeployment::Processor
- Defined in:
- lib/rrt_ruby/rrt_deployment.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#cpu ⇒ Object
readonly
Returns the value of attribute cpu.
-
#os ⇒ Object
readonly
Returns the value of attribute os.
-
#processes ⇒ Object
readonly
Returns the value of attribute processes.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Attributes inherited from RRT_RUBY::RRTGeneric::Element
#documentation, #name, #qualifiedname, #stereotype
Instance Method Summary collapse
-
#initialize(element) ⇒ Processor
constructor
A new instance of Processor.
- #to_s ⇒ Object
Constructor Details
#initialize(element) ⇒ Processor
Returns a new instance of Processor.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 13 def initialize element begin super(element) @cpu=element.CPU @os=element.OS @address=element.Address @server=element.ServerAddress @processes=Array.new extract_processes(element) rescue raise RRTGeneric::ElementException.new(element),"error while initialising element: #{$!}" end end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
12 13 14 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 12 def address @address end |
#cpu ⇒ Object (readonly)
Returns the value of attribute cpu.
12 13 14 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 12 def cpu @cpu end |
#os ⇒ Object (readonly)
Returns the value of attribute os.
12 13 14 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 12 def os @os end |
#processes ⇒ Object (readonly)
Returns the value of attribute processes.
12 13 14 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 12 def processes @processes end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
12 13 14 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 12 def server @server end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/rrt_ruby/rrt_deployment.rb', line 26 def to_s return super()+", #{@os}/#{@cpu}, #{@address}, #{@processes.size} processes" end |