Class: SFCcustom::Template
- Inherits:
-
Object
- Object
- SFCcustom::Template
- Defined in:
- lib/sfc-custom.rb
Instance Attribute Summary collapse
-
#customization_signature ⇒ Object
Returns the value of attribute customization_signature.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #blocks ⇒ Object
- #generate! ⇒ Object
-
#initialize(name) ⇒ Template
constructor
A new instance of Template.
- #preview_url ⇒ Object
Constructor Details
#initialize(name) ⇒ Template
Returns a new instance of Template.
106 107 108 |
# File 'lib/sfc-custom.rb', line 106 def initialize(name) @name = name end |
Instance Attribute Details
#customization_signature ⇒ Object
Returns the value of attribute customization_signature.
104 105 106 |
# File 'lib/sfc-custom.rb', line 104 def customization_signature @customization_signature end |
#name ⇒ Object
Returns the value of attribute name.
104 105 106 |
# File 'lib/sfc-custom.rb', line 104 def name @name end |
Instance Method Details
#blocks ⇒ Object
110 111 112 |
# File 'lib/sfc-custom.rb', line 110 def blocks [Block.new, Block.new] end |
#generate! ⇒ Object
114 115 116 |
# File 'lib/sfc-custom.rb', line 114 def generate! @customization_signature = Digest::MD5.hexdigest(Time.now.to_s) end |
#preview_url ⇒ Object
118 119 120 |
# File 'lib/sfc-custom.rb', line 118 def preview_url "http://custom.sfcgraphics.com/#{@customization_signature}.jpg" if @customization_signature end |