Class: AssetBox
- Inherits:
-
Object
- Object
- AssetBox
- Defined in:
- lib/inputs/asset_box.rb
Instance Method Summary collapse
-
#initialize(object, object_name, template, method, opts) ⇒ AssetBox
constructor
A new instance of AssetBox.
- #to_html ⇒ Object
Constructor Details
#initialize(object, object_name, template, method, opts) ⇒ AssetBox
Returns a new instance of AssetBox.
4 5 6 7 8 9 |
# File 'lib/inputs/asset_box.rb', line 4 def initialize(object, object_name, template, method, opts) @object = object @object_name = object_name @template = template @options = (method, opts) end |
Instance Method Details
#to_html ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/inputs/asset_box.rb', line 11 def to_html output = '' output += header_html if @options[:uploader] == :top output += uploader_html output += output += dialog_html if @options[:dialog] else output += output += dialog_html if @options[:dialog] output += uploader_html if @options[:uploader] end output += output.html_safe end |