Module: Adparlor::Facebook::GraphApi::Traits::Methods::ClassMethods
- Defined in:
- lib/adparlor/facebook/graph_api/traits/methods.rb
Instance Method Summary collapse
- #allow_local_method(*args) ⇒ Object
- #allow_method(*args) ⇒ Object
- #allowed_local_methods ⇒ Object
- #allowed_methods ⇒ Object
- #create(path, options = {}) ⇒ Object
- #destroy(path, options = {}) ⇒ Object
- #update(path, options = {}) ⇒ Object
Instance Method Details
#allow_local_method(*args) ⇒ Object
29 30 31 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 29 def allow_local_method(*args) @allowed_local_methods = args end |
#allow_method(*args) ⇒ Object
33 34 35 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 33 def allow_method(*args) @allowed_methods = args end |
#allowed_local_methods ⇒ Object
37 38 39 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 37 def allowed_local_methods @allowed_local_methods end |
#allowed_methods ⇒ Object
41 42 43 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 41 def allowed_methods @allowed_methods end |
#create(path, options = {}) ⇒ Object
45 46 47 48 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 45 def create(path, = {}) raise FbError.new('create not available', 500) unless @allowed_local_methods && @allowed_local_methods.include?(:create) super(path, ) end |
#destroy(path, options = {}) ⇒ Object
50 51 52 53 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 50 def destroy(path, = {}) raise FbError.new('destroy not available, use soft delete update', 500) unless @allowed_local_methods && @allowed_local_methods.include?(:destroy) super(path, ) end |
#update(path, options = {}) ⇒ Object
55 56 57 58 |
# File 'lib/adparlor/facebook/graph_api/traits/methods.rb', line 55 def update(path, = {}) raise FbError.new('update not available', 500) unless @allowed_local_methods && @allowed_local_methods.include?(:update) super(path, ) end |