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

Returns the current value of code.

Returns:

  • (String)

    the current value of code



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

def code
  @code
end

#messageString

Returns the current value of message.

Returns:

  • (String)

    the current value of message



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

def message
  @message
end

#typeInteger

Returns the current value of type.

Returns:

  • (Integer)

    the current value of type



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

Returns:

  • (Boolean)


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

def heartbeat?
  @type == 2
end

#status?Boolean

Returns:

  • (Boolean)


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

def status?
  @type == 4
end

#to_sString

Returns:

  • (String)


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

def to_s
  @message
end

#validation?Boolean

Returns:

  • (Boolean)


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

def validation?
  @type == 1
end