Class: RewardStation::StubResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/reward_station/stub_response.rb

Class Method Summary collapse

Class Method Details

.gem_responses_pathObject



5
6
7
# File 'lib/reward_station/stub_response.rb', line 5

def gem_responses_path
  File.join(File.dirname(__FILE__), "responses")
end

.load(*args) ⇒ Object Also known as: []



13
14
15
16
# File 'lib/reward_station/stub_response.rb', line 13

def load(*args)
  file_name = args.last
  responses[file_name] ||= load_response_file file_name
end

.local_responses_pathObject



9
10
11
# File 'lib/reward_station/stub_response.rb', line 9

def local_responses_path
  File.expand_path('config/reward_station/responses') rescue nil
end