Class: SimpleAcp::Models::SessionResponse
- Defined in:
- lib/simple_acp/models/session.rb
Overview
Response for getting session details
Class Method Summary collapse
Methods inherited from Base
#==, attribute, attributes, from_hash, #hash, #initialize, own_attributes, #to_h, #to_json
Constructor Details
This class inherits a constructor from SimpleAcp::Models::Base
Class Method Details
.from_session(session) ⇒ Object
127 128 129 130 131 132 133 134 |
# File 'lib/simple_acp/models/session.rb', line 127 def self.from_session(session) new( id: session.id, history_count: session.history.length, has_state: !session.state.nil?, created_at: Time.now ) end |