Class: Yelp::Business

Inherits:
Object
  • Object
show all
Defined in:
lib/yelp2/business.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Business

Returns a new instance of Business.



6
7
8
# File 'lib/yelp2/business.rb', line 6

def initialize(hash)
  @hash = hash
end

Instance Method Details

#idObject



10
11
12
# File 'lib/yelp2/business.rb', line 10

def id
  @hash["id"]
end

#image_urlObject



30
31
32
# File 'lib/yelp2/business.rb', line 30

def image_url
  @hash["image_url"]
end

#locationObject



38
39
40
# File 'lib/yelp2/business.rb', line 38

def location
  Yelp::Location.new(@hash["location"])
end

#mobile_urlObject



26
27
28
# File 'lib/yelp2/business.rb', line 26

def mobile_url
  @hash["mobile_url"]
end

#nameObject



14
15
16
# File 'lib/yelp2/business.rb', line 14

def name
  @hash["name"]
end

#phoneObject



18
19
20
# File 'lib/yelp2/business.rb', line 18

def phone
  @hash["phone"]
end

#review_countObject



34
35
36
# File 'lib/yelp2/business.rb', line 34

def review_count
  @hash["review_count"]
end

#urlObject



22
23
24
# File 'lib/yelp2/business.rb', line 22

def url
  @hash["url"]
end