Class: Avocado::Resource

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/avocado/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResource

Returns a new instance of Resource.



7
8
9
10
# File 'app/models/avocado/resource.rb', line 7

def initialize(*)
  @endpoints = Set.new
  super
end

Instance Attribute Details

#endpointsObject

Returns the value of attribute endpoints.



5
6
7
# File 'app/models/avocado/resource.rb', line 5

def endpoints
  @endpoints
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'app/models/avocado/resource.rb', line 5

def name
  @name
end

Instance Method Details

#<=>(other) ⇒ Object



12
13
14
# File 'app/models/avocado/resource.rb', line 12

def <=>(other)
  name <=> other.name
end