Scope
Scope for capability contract builders.
Provides access to the representation and actions for this contract. Use this to query contract-specific state when building types.
Instance Methods
#action?
#action?(name)
Whether this scope includes the given action.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
name | Symbol | The action name. |
Returns
Boolean
#actions
#actions
The actions for this scope.
Returns
Hash{Symbol => Resource::Action}
#associations
#associations
The associations for this scope.
Returns
Hash{Symbol => Representation::Association}
#attributes
#attributes
The attributes for this scope.
Returns
Hash{Symbol => Representation::Attribute}
#collection_actions
#collection_actions
The collection actions for this scope.
Returns
Hash{Symbol => Resource::Action}
#crud_actions
#crud_actions
The CRUD actions for this scope.
Returns
Hash{Symbol => Resource::Action}
#filterable_attributes
#filterable_attributes
The filterable attributes for this scope.
Returns
Array<Representation::Attribute>
#member_actions
#member_actions
The member actions for this scope.
Returns
Hash{Symbol => Resource::Action}
#root_key
#root_key
The root key for this scope.
Returns
#sortable_attributes
#sortable_attributes
The sortable attributes for this scope.
Returns
Array<Representation::Attribute>
#writable_attributes
#writable_attributes
The writable attributes for this scope.
Returns
Array<Representation::Attribute>