Class: FbGraph::Privacy

Inherits:
Object
  • Object
show all
Includes:
Comparison, Serialization
Defined in:
lib/fb_graph/privacy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Serialization

#as_json, #to_json

Methods included from Comparison

#==

Constructor Details

#initialize(attriutes = {}) ⇒ Privacy

Returns a new instance of Privacy.



8
9
10
11
12
13
14
15
# File 'lib/fb_graph/privacy.rb', line 8

def initialize(attriutes = {})
  @value       = attriutes[:value]
  @description = attriutes[:description]
  @friends     = attriutes[:friends]
  @networks    = attriutes[:networks]
  @allow       = attriutes[:allow]
  @deny        = attriutes[:deny]
end

Instance Attribute Details

#allowObject

Returns the value of attribute allow.



6
7
8
# File 'lib/fb_graph/privacy.rb', line 6

def allow
  @allow
end

#denyObject

Returns the value of attribute deny.



6
7
8
# File 'lib/fb_graph/privacy.rb', line 6

def deny
  @deny
end

#friendsObject

Returns the value of attribute friends.



6
7
8
# File 'lib/fb_graph/privacy.rb', line 6

def friends
  @friends
end

#networksObject

Returns the value of attribute networks.



6
7
8
# File 'lib/fb_graph/privacy.rb', line 6

def networks
  @networks
end

#valueObject

Returns the value of attribute value.



6
7
8
# File 'lib/fb_graph/privacy.rb', line 6

def value
  @value
end

Instance Method Details

#to_hash(options = {}) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/fb_graph/privacy.rb', line 17

def to_hash(options = {})
  {
    :value => self.value,
    :friends => self.friends,
    :networks => self.networks,
    :allow => self.allow,
    :deny => self.deny
  }
end