Module: Sappy::Responses

Defined in:
lib/sappy/responses.rb,
lib/sappy/responses/auth.rb,
lib/sappy/responses/monitors.rb,
lib/sappy/responses/add_monitor.rb,
lib/sappy/responses/account_info.rb,
lib/sappy/responses/edit_monitor.rb,
lib/sappy/responses/enable_monitor.rb,
lib/sappy/responses/remove_monitor.rb,
lib/sappy/responses/disable_monitor.rb,
lib/sappy/responses/daily_statistics.rb,
lib/sappy/responses/annual_statistics.rb,
lib/sappy/responses/monthly_statistics.rb,
lib/sappy/responses/summary_statistics.rb

Defined Under Namespace

Classes: AccountInfo, AddMonitor, AnnualStatistics, Auth, DailyStatistics, DisableMonitor, EditMonitor, EnableMonitor, Monitors, MonthlyStatistics, RemoveMonitor, SummaryStatistics

Constant Summary collapse

MAP =
{
  "auth" => Auth,
  "accountinfo" => AccountInfo,
  "summarystatistics" => SummaryStatistics,
  "monitors" => Monitors,
  "addmonitor" => AddMonitor,
  "editmonitor" => EditMonitor,
  "removemonitor" => RemoveMonitor,
  "enablemonitor" => EnableMonitor,
  "disablemonitor" => DisableMonitor,
  "dailystatistics" => DailyStatistics,
  "monthlystatistics" => MonthlyStatistics,
  "annualstatistics" => AnnualStatistics
}

Class Method Summary collapse

Class Method Details

.for(action) ⇒ Object



31
32
33
# File 'lib/sappy/responses.rb', line 31

def self.for(action)
  MAP[action] || raise(ArgumentError, "Couldn't find a Response class to parse a #{action.inspect} result")
end