Class: Arcp::Session::Bye

Inherits:
Data
  • Object
show all
Defined in:
lib/arcp/session/bye.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



5
6
7
# File 'lib/arcp/session/bye.rb', line 5

def reason
  @reason
end

Class Method Details

.from_h(h) ⇒ Object



6
# File 'lib/arcp/session/bye.rb', line 6

def self.from_h(h) = new(reason: h.transform_keys(&:to_s)['reason'])

Instance Method Details

#to_hObject



7
# File 'lib/arcp/session/bye.rb', line 7

def to_h = { 'reason' => reason }.compact