Class: Yadokari::Me

Inherits:
Object
  • Object
show all
Includes:
Api
Defined in:
lib/yadokari/me.rb

Constant Summary

Constants included from Api

Api::API_ENTRY_POINT, Api::END_POINT

Instance Method Summary collapse

Methods included from Api

#do_get, #do_post

Constructor Details

#initialize(token) ⇒ Me

Returns a new instance of Me.



7
8
9
# File 'lib/yadokari/me.rb', line 7

def initialize(token)
  @token = token
end

Instance Method Details

#runObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/yadokari/me.rb', line 11

def run
  result = do_get("/me/#{@token}")
  puts result
  puts <<-EOS
*** YOUR INFOMATION ***
check in date: #{result['check_in_on']}
check out date: #{result['check_out_on']}
your name: #{result['name']}
email address: #{result['email']}
tel: #{result['tel']}
how many man: #{result['men_number']}
how many women: #{result['women_number']}
check in time: #{result['check_in_time']}
purpose of use: #{result['purpose_of_use']}
payment method: #{result['payment_method']}
note: #{result['note']}
**********************
  EOS
end