Module: CanTango::Api::Options

Included in:
Ability::Account, Ability::User
Defined in:
lib/cantango/api/options.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.options_listObject



11
12
13
# File 'lib/cantango/api/options.rb', line 11

def self.options_list
  [:session, :request, :params, :controller, :domain, :cookies]
end

Instance Method Details

#ability_optionsObject



3
4
5
6
7
8
9
# File 'lib/cantango/api/options.rb', line 3

def ability_options
  opts = {}
  options_list.each do |option|
    opts.merge!(option => send(option)) if respond_to? option, true
  end
  opts
end

#options_listObject



15
16
17
# File 'lib/cantango/api/options.rb', line 15

def options_list
  CanTango::Api::Options.options_list
end