Class: Formatron::Generators::Bootstrap::Formatronfile::Template
- Inherits:
-
Object
- Object
- Formatron::Generators::Bootstrap::Formatronfile::Template
- Defined in:
- lib/formatron/generators/bootstrap/formatronfile.rb
Overview
exports params to bootstrap ERB template
Instance Attribute Summary collapse
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #databag_secret ⇒ Object
- #guid ⇒ Object
-
#initialize(params) ⇒ Template
constructor
A new instance of Template.
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
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
12 13 14 |
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 12 def ip @ip end |
#params ⇒ Object (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_secret ⇒ Object
23 24 25 |
# File 'lib/formatron/generators/bootstrap/formatronfile.rb', line 23 def databag_secret Util.databag_secret end |