Class: Zvent::Category

Inherits:
Base show all
Defined in:
lib/zvent/category.rb

Overview

An object that represents a single venue from zvents

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#get_resources

Constructor Details

#initialize(category_hash) ⇒ Category

Returns a new instance of Category.



6
7
8
9
10
11
12
# File 'lib/zvent/category.rb', line 6

def initialize(category_hash)
  begin
    category_hash.each_pair{|key, value| self.send("#{key}=", value) }
  rescue NoMethodError => e
    # Do nothing!
  end
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



4
5
6
# File 'lib/zvent/category.rb', line 4

def count
  @count
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/zvent/category.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/zvent/category.rb', line 4

def name
  @name
end

#pidObject

Returns the value of attribute pid.



4
5
6
# File 'lib/zvent/category.rb', line 4

def pid
  @pid
end