Class: FakeAPI::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/fakeapi/app.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApp

Returns a new instance of App.



7
8
9
10
# File 'lib/fakeapi/app.rb', line 7

def initialize(*)
  super
  @data = {}
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/fakeapi/app.rb', line 5

def data
  @data
end

Class Method Details

.test(method_name, &call_block) ⇒ Object



12
13
14
# File 'lib/fakeapi/app.rb', line 12

def self.test(method_name, &call_block)
  TestRun.new(self, method_name, call_block).run
end