Class: Apicraft::Mocker::Object

Inherits:
Base
  • Object
show all
Defined in:
lib/apicraft/mocker/object.rb

Overview

Generate an object based on the schema using Mocker types

Instance Attribute Summary

Attributes inherited from Base

#schema

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Apicraft::Mocker::Base

Instance Method Details

#mockObject



8
9
10
11
12
13
14
# File 'lib/apicraft/mocker/object.rb', line 8

def mock
  res = {}
  properties.each do |k, v|
    res[k] = Mocker.mock(v)
  end
  res
end