Module: ApiSketch::Model::SharedBlock
- Defined in:
- lib/api_sketch/model/shared_block.rb
Class Method Summary collapse
Class Method Details
.add(name, block) ⇒ Object
5 6 7 |
# File 'lib/api_sketch/model/shared_block.rb', line 5 def add(name, block) @list_hash[name] = block end |
.find(name) ⇒ Object
13 14 15 |
# File 'lib/api_sketch/model/shared_block.rb', line 13 def find(name) @list_hash[name] || raise(::ApiSketch::Error, "Shared block '#{name}' is not defined") end |
.reset! ⇒ Object
9 10 11 |
# File 'lib/api_sketch/model/shared_block.rb', line 9 def reset! @list_hash = {} end |