Class: Enklawa::Api::Category

Inherits:
Struct
  • Object
show all
Defined in:
lib/enklawa/api/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



3
4
5
# File 'lib/enklawa/api/category.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/enklawa/api/category.rb', line 3

def name
  @name
end

Instance Method Details

#to_hObject



5
6
7
8
9
10
# File 'lib/enklawa/api/category.rb', line 5

def to_h
  {
    id: id,
    name: name
  }
end