Class: Agent
- Inherits:
-
Object
- Object
- Agent
- Defined in:
- lib/borderbot/agent.rb
Instance Attribute Summary collapse
-
#bwt_url ⇒ Object
readonly
Returns the value of attribute bwt_url.
-
#executed_at ⇒ Object
readonly
Returns the value of attribute executed_at.
-
#ports ⇒ Object
readonly
Returns the value of attribute ports.
Instance Method Summary collapse
- #compute ⇒ Object
-
#initialize ⇒ Agent
constructor
A new instance of Agent.
Constructor Details
Instance Attribute Details
#bwt_url ⇒ Object (readonly)
Returns the value of attribute bwt_url.
8 9 10 |
# File 'lib/borderbot/agent.rb', line 8 def bwt_url @bwt_url end |
#executed_at ⇒ Object (readonly)
Returns the value of attribute executed_at.
8 9 10 |
# File 'lib/borderbot/agent.rb', line 8 def executed_at @executed_at end |
#ports ⇒ Object (readonly)
Returns the value of attribute ports.
8 9 10 |
# File 'lib/borderbot/agent.rb', line 8 def ports @ports end |
Instance Method Details
#compute ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/borderbot/agent.rb', line 17 def compute #New Query Core instance queryCore = Qcore.new #Get XML data from BWT website bwtXML = queryCore.get_bwt_xml_data #set the ordereded ports into @ports @ports = queryCore.extract_ports(bwtXML) #set the last execution time @executed_at = DateTime.now end |