Class: Checkpoint::Resource::AllOfType
- Inherits:
-
Checkpoint::Resource
- Object
- Checkpoint::Resource
- Checkpoint::Resource::AllOfType
- Defined in:
- lib/checkpoint/resource/all_of_type.rb
Overview
Specialized Resource type to represent all entities of a particular type.
Constant Summary
Constants inherited from Checkpoint::Resource
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Checkpoint::Resource
Instance Method Summary collapse
-
#eql?(other) ⇒ Boolean
(also: #==)
Compares with another Resource.
-
#id ⇒ Object
This is always the special ALL resource ID.
-
#initialize(type) ⇒ AllOfType
constructor
Create a wildcard Resource for a given type.
Methods inherited from Checkpoint::Resource
all, #all?, #all_of_type, #all_of_type?, #to_resource, #token
Constructor Details
#initialize(type) ⇒ AllOfType
Create a wildcard Resource for a given type
9 10 11 |
# File 'lib/checkpoint/resource/all_of_type.rb', line 9 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/checkpoint/resource/all_of_type.rb', line 7 def type @type end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
Compares with another Resource
21 22 23 |
# File 'lib/checkpoint/resource/all_of_type.rb', line 21 def eql?(other) other.is_a?(Resource) && type == other.type end |