Module: CanTango::Api::Options

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.options_listObject



13
14
15
# File 'lib/cantango/api/options.rb', line 13

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

Instance Method Details

#ability_optionsObject



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

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

#options_listObject



17
18
19
# File 'lib/cantango/api/options.rb', line 17

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