Class: CafeCar::Attributes::Actions

Inherits:
Struct
  • Object
show all
Defined in:
lib/cafe_car/attributes.rb

Overview

Reads the policy's three host-overridable action lists through one object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#policyObject

Returns the value of attribute policy

Returns:

  • (Object)

    the current value of policy



41
42
43
# File 'lib/cafe_car/attributes.rb', line 41

def policy
  @policy
end

Instance Method Details

#bulkObject



44
# File 'lib/cafe_car/attributes.rb', line 44

def bulk       = policy.permitted_bulk_actions

#collectionObject



43
# File 'lib/cafe_car/attributes.rb', line 43

def collection = policy.permitted_collection_actions

#memberObject



42
# File 'lib/cafe_car/attributes.rb', line 42

def member     = policy.permitted_member_actions