Class: Chiketto::Venue

Inherits:
Resource show all
Defined in:
lib/chiketto/venue.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

build_query_string, endpoint, get, #initialize, open_post, paginated, post, should_paginate, token

Methods included from AttrDSL

included

Constructor Details

This class inherits a constructor from Chiketto::Resource

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/chiketto/venue.rb', line 3

def name
  @name
end

Class Method Details

.find(id) ⇒ Object



5
6
7
8
# File 'lib/chiketto/venue.rb', line 5

def self.find(id)
  response = get "venues/#{id}"
  new response
end

Instance Method Details

#addressObject



10
11
12
# File 'lib/chiketto/venue.rb', line 10

def address
  Chiketto::Address.new @address.to_h
end

#to_sObject



14
15
16
# File 'lib/chiketto/venue.rb', line 14

def to_s
  @name
end