Class: Nis::Struct::NemRequestResult

Inherits:
Object
  • Object
show all
Includes:
Util::Assignable
Defined in:
lib/nis/struct/nem_request_result.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::Assignable

#[], #initialize, #to_hash, #to_json

Instance Attribute Details

#codeString


6
7
8
# File 'lib/nis/struct/nem_request_result.rb', line 6

def code
  @code
end

#messageString


6
7
8
# File 'lib/nis/struct/nem_request_result.rb', line 6

def message
  @message
end

#typeInteger


6
7
8
# File 'lib/nis/struct/nem_request_result.rb', line 6

def type
  @type
end

Class Method Details

.build(attrs) ⇒ Object


10
11
12
# File 'lib/nis/struct/nem_request_result.rb', line 10

def self.build(attrs)
  new(attrs)
end

Instance Method Details

#heartbeat?Boolean


20
21
22
# File 'lib/nis/struct/nem_request_result.rb', line 20

def heartbeat?
  @type == 2
end

#status?Boolean


25
26
27
# File 'lib/nis/struct/nem_request_result.rb', line 25

def status?
  @type == 4
end

#to_sString


30
31
32
# File 'lib/nis/struct/nem_request_result.rb', line 30

def to_s
  @message
end

#validation?Boolean


15
16
17
# File 'lib/nis/struct/nem_request_result.rb', line 15

def validation?
  @type == 1
end