Class: Social::Env

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/social/env.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/social/env.rb', line 5

def id
  @id
end

#prefixObject

Returns the value of attribute prefix.



5
6
7
# File 'lib/social/env.rb', line 5

def prefix
  @prefix
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/social/env.rb', line 5

def type
  @type
end

Class Method Details

.idObject



18
19
20
# File 'lib/social/env.rb', line 18

def id
  instance.id
end

.init(params) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/social/env.rb', line 9

def init(params)
  raise "Cant find social env in params #{params.inspect}" unless params[:social_env]

  env             = params[:social_env]
  instance.id     = env[:id] 
  instance.type   = env[:type] 
  instance.prefix = env[:prefix] 
end

.prefixObject



26
27
28
# File 'lib/social/env.rb', line 26

def prefix
  instance.prefix
end

.typeObject



22
23
24
# File 'lib/social/env.rb', line 22

def type
  instance.type
end