Class: Formatron::Generators::Bootstrap::Formatronfile::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/formatron/generators/bootstrap/formatronfile.rb

Overview

exports params to bootstrap ERB template

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Template

Returns a new instance of Template.



14
15
16
17
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 14

def initialize(params)
  @params = params
  @ip = Curl.get('http://whatismyip.akamai.com').body_str
end

Instance Attribute Details

#ipObject (readonly)

Returns the value of attribute ip.



12
13
14
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 12

def ip
  @ip
end

#paramsObject (readonly)

Returns the value of attribute params.



12
13
14
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 12

def params
  @params
end

Instance Method Details

#databag_secretObject



23
24
25
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 23

def databag_secret
  Util.databag_secret
end

#guidObject



19
20
21
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 19

def guid
  Util.guid
end