Class: Mogli::Action

Inherits:
Model
  • Object
show all
Defined in:
lib/mogli/action.rb

Instance Attribute Summary

Attributes inherited from Model

#type

Attributes included from Model::Search

#search_type

Instance Method Summary (collapse)

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, recognize?, #warn_about_invalid_property

Methods included from Model::Search

#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

Instance Method Details

- (Object) to_json(options = nil)

simple implementation of to_json, ignoring options like :only, :except, :include, :methods because this is primarily intended for being submitted to facebook



8
9
10
# File 'lib/mogli/action.rb', line 8

def to_json(options = nil)
  "{\"name\":\"#{name}\",\"link\":\"#{link}\"}"
end