Class: NetDocuments::UseToken::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/net_documents/use_token/result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#successObject



6
7
8
# File 'lib/net_documents/use_token/result.rb', line 6

def success
  @success ||= false
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/net_documents/use_token/result.rb', line 4

def value
  @value
end

Class Method Details

.failureObject



12
13
14
15
16
# File 'lib/net_documents/use_token/result.rb', line 12

def self.failure
  result = Result.new
  result.success = false
  result
end

.success(value) ⇒ Object



18
19
20
21
22
23
# File 'lib/net_documents/use_token/result.rb', line 18

def self.success(value)
  result = Result.new
  result.value = value
  result.success = true
  result
end

Instance Method Details

#success?Object



10
11
12
# File 'lib/net_documents/use_token/result.rb', line 10

def success
  @success ||= false
end