Class: Nem::Model::Connection

Inherits:
Object
  • Object
show all
Includes:
Nem::Mixin::Assignable
Defined in:
lib/nem/model/connection.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Nem::Mixin::Assignable

#initialize

Instance Attribute Details

#elapsed_timeObject (readonly)

Returns the value of attribute elapsed_time.



6
7
8
# File 'lib/nem/model/connection.rb', line 6

def elapsed_time
  @elapsed_time
end

#hostObject (readonly)

Returns the value of attribute host.



6
7
8
# File 'lib/nem/model/connection.rb', line 6

def host
  @host
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/nem/model/connection.rb', line 6

def id
  @id
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/nem/model/connection.rb', line 6

def path
  @path
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



6
7
8
# File 'lib/nem/model/connection.rb', line 6

def start_time
  @start_time
end

Class Method Details

.new_from_connection(hash) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/nem/model/connection.rb', line 12

def self.new_from_connection(hash)
  new(
    path: hash[:path],
    start_time: hash[:"start-time"],
    host: hash[:host],
    elapsed_time: hash[:"elapsed-time"],
    id: hash[:id]
  )
end