Class: Kintone::Api::Guest
- Extended by:
- Forwardable
- Defined in:
- lib/kintone/api/guest.rb
Defined Under Namespace
Classes: CommandAccessor
Constant Summary collapse
- GUEST_PATH =
'/k/guest/%s/v1/'- ACCESSIBLE_COMMAND =
[ :record, :records, :form, :app_acl, :record_acl, :field_acl, :space, :space_body, :space_thread, :space_members, :space_guests, :app, :apps, :bulk_request, :bulk ].freeze
Instance Method Summary collapse
- #get_url(command) ⇒ Object
-
#initialize(space_id, api) ⇒ Guest
constructor
A new instance of Guest.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(space_id, api) ⇒ Guest
Returns a new instance of Guest.
30 31 32 33 |
# File 'lib/kintone/api/guest.rb', line 30 def initialize(space_id, api) @api = api @guest_path = GUEST_PATH % space_id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/kintone/api/guest.rb', line 39 def method_missing(name, *args) if ACCESSIBLE_COMMAND.include?(name) CommandAccessor.send(name, self) else super(name, *args) end end |
Instance Method Details
#get_url(command) ⇒ Object
35 36 37 |
# File 'lib/kintone/api/guest.rb', line 35 def get_url(command) @guest_path + (COMMAND % command) end |