Class: Applitools::Session
- Inherits:
-
Object
- Object
- Applitools::Session
- Defined in:
- lib/applitools/core/session.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#session_data ⇒ Object
readonly
Returns the value of attribute session_data.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(server_response, new_session) ⇒ Session
constructor
A new instance of Session.
- #new_session? ⇒ Boolean
Constructor Details
#initialize(server_response, new_session) ⇒ Session
Returns a new instance of Session.
9 10 11 12 13 14 |
# File 'lib/applitools/core/session.rb', line 9 def initialize(server_response, new_session) @session_data = server_response @id = session_data['id'] @url = session_data['url'] @new_session = new_session end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/applitools/core/session.rb', line 5 def id @id end |
#session_data ⇒ Object (readonly)
Returns the value of attribute session_data.
5 6 7 |
# File 'lib/applitools/core/session.rb', line 5 def session_data @session_data end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/applitools/core/session.rb', line 5 def url @url end |
Instance Method Details
#new_session? ⇒ Boolean
16 17 18 19 20 21 22 |
# File 'lib/applitools/core/session.rb', line 16 def new_session? unless (result = session_data['isNew']).nil? return @new_session unless result.is_a?(TrueClass) | result.is_a?(FalseClass) return result end @new_session end |