Class: OpenAPISourceTools::RestoreProcessorStorage

Inherits:
Object
  • Object
show all
Includes:
TaskInterface
Defined in:
lib/openapi/sourcetools/task.rb

Overview

Sets Gen.x to empty hash. Inserted after gem tasks.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from TaskInterface

#executable, #output_name

Constructor Details

#initialize(x = {}) ⇒ RestoreProcessorStorage

Sets initial default value.



120
121
122
123
# File 'lib/openapi/sourcetools/task.rb', line 120

def initialize(x = {})
  @x = x
  Gen.x = @x
end

Instance Attribute Details

#xObject

Allows setting the current value when setup code finishes.



117
118
119
# File 'lib/openapi/sourcetools/task.rb', line 117

def x
  @x
end

Instance Method Details

#discardObject



129
130
131
# File 'lib/openapi/sourcetools/task.rb', line 129

def discard
  true
end

#generate(_context_binding) ⇒ Object



125
126
127
# File 'lib/openapi/sourcetools/task.rb', line 125

def generate(_context_binding)
  Gen.x = @x # Restore whatever was current when setup code finished.
end

#systemObject



133
134
135
# File 'lib/openapi/sourcetools/task.rb', line 133

def system
  true
end