Class: Mogli::Page
Defined Under Namespace
Classes: MissingAccessToken
Instance Attribute Summary
Attributes inherited from Model
Attributes included from Model::Search
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Profile
#image_url, #large_image_url, #normal_image_url, #sized_image_url, #small_image_url, #square_image_url, #to_s
Methods inherited from Model
#==, add_creation_method, #client, #client=, creation_keys, creation_properties, define_properties, #destroy, #fetch, find, fql_mapping, has_association, hash_populating_accessor, hash_populating_accessor_with_default_field, included, #initialize, #merge!, #method_missing, #post_params, property, #warn_about_invalid_property
Methods included from Model::Search
Constructor Details
This class inherits a constructor from Mogli::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mogli::Model
Class Method Details
.recognize?(hash) ⇒ Boolean
29 30 31 |
# File 'lib/mogli/page.rb', line 29 def self.recognize?(hash) hash.has_key?("category") end |
Instance Method Details
#client_for_page ⇒ Object
22 23 24 25 26 27 |
# File 'lib/mogli/page.rb', line 22 def client_for_page if access_token.nil? || access_token.empty? raise MissingAccessToken.new("You can only get a client for this page if an access_token has been provided. i.e. via /me/accounts") end Client.new(access_token) end |