Class: CloudSpokes::Model::Category

Inherits:
BaseApi
  • Object
show all
Defined in:
app/models/cloud_spokes/model/category.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



2
3
4
# File 'app/models/cloud_spokes/model/category.rb', line 2

def attributes
  @attributes
end

#colorObject

Returns the value of attribute color.



2
3
4
# File 'app/models/cloud_spokes/model/category.rb', line 2

def color
  @color
end

#idObject

Returns the value of attribute id.



2
3
4
# File 'app/models/cloud_spokes/model/category.rb', line 2

def id
  @id
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'app/models/cloud_spokes/model/category.rb', line 2

def name
  @name
end

Class Method Details

.api_endpointObject



5
6
7
# File 'app/models/cloud_spokes/model/category.rb', line 5

def self.api_endpoint
  CloudSpokes::APP_CONFIG[:cs_api][:categories]
end

.namesObject



9
10
11
# File 'app/models/cloud_spokes/model/category.rb', line 9

def self.names
  all.map {|category| category.name}
end