Class: ThinkNear::Category

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/think_near/category.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



3
4
5
6
7
# File 'lib/think_near/category.rb', line 3

def self.all
  Client.get_categories.map do |category_name|
    new :name => category_name
  end
end

Instance Method Details

#attributesObject



15
16
17
# File 'lib/think_near/category.rb', line 15

def attributes
  @table
end

#drawsObject



9
10
11
12
13
# File 'lib/think_near/category.rb', line 9

def draws
  Client.get_draws(name).map do |item|
    Draw.new item['draw']
  end
end