Class: NeptuneApex::Controller
- Inherits:
-
Object
- Object
- NeptuneApex::Controller
- Defined in:
- lib/neptune_apex/controller.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Controller password.
-
#url ⇒ Object
Controller URL.
-
#user ⇒ Object
Controller username.
Instance Method Summary collapse
-
#datalog ⇒ Object
Get the datalog from the controller.
-
#status ⇒ Object
Get the current status of the controller.
-
#user_agent ⇒ Object
Get a prepared UserAgent.
Instance Attribute Details
#password ⇒ Object
Controller password
14 15 16 |
# File 'lib/neptune_apex/controller.rb', line 14 def password @password end |
#url ⇒ Object
Controller URL
8 9 10 |
# File 'lib/neptune_apex/controller.rb', line 8 def url @url end |
#user ⇒ Object
Controller username
11 12 13 |
# File 'lib/neptune_apex/controller.rb', line 11 def user @user end |
Instance Method Details
#datalog ⇒ Object
Get the datalog from the controller
26 27 28 |
# File 'lib/neptune_apex/controller.rb', line 26 def datalog Datalog.from_xml(open("#{@url}/cgi-bin/datalog.xml")) end |
#status ⇒ Object
Get the current status of the controller
19 20 21 |
# File 'lib/neptune_apex/controller.rb', line 19 def status Status.from_xml(open("#{@url}/cgi-bin/status.xml")) end |
#user_agent ⇒ Object
Get a prepared UserAgent
32 33 34 35 36 37 38 39 |
# File 'lib/neptune_apex/controller.rb', line 32 def user_agent unless @user_agent @user_agent = HTTPClient.new @user_agent.set_auth(@url, @user, @password) end @user_agent end |