Class: SocialSharePrivacy::Config

Inherits:
Object
  • Object
show all
Includes:
Evaluatable, JSONable
Defined in:
lib/social_share_privacy.rb

Defined Under Namespace

Classes: Cookie, Services

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Evaluatable

#eval

Methods included from JSONable

#to_s

Constructor Details

#initializeConfig

Returns a new instance of Config.



193
194
195
196
# File 'lib/social_share_privacy.rb', line 193

def initialize
  @txt_help = Proc.new { I18n.t('social_share_privacy.txt_help') }
  @txt_perma = Proc.new { I18n.t('social_share_privacy.txt_perma') }
end

Instance Attribute Details

Returns the value of attribute info_link.



73
74
75
# File 'lib/social_share_privacy.rb', line 73

def info_link
  @info_link
end

#uriObject

Returns the value of attribute uri.



73
74
75
# File 'lib/social_share_privacy.rb', line 73

def uri
  @uri
end

Instance Method Details

Yields:



198
199
200
# File 'lib/social_share_privacy.rb', line 198

def cookie
  yield(@cookie ||= Cookie.new)
end

#services {|@services ||= Services.new| ... } ⇒ Object

Yields:



202
203
204
# File 'lib/social_share_privacy.rb', line 202

def services
  yield(@services ||= Services.new)
end