Class: ObjectView::JavascriptFile

Inherits:
Element
  • Object
show all
Defined in:
lib/object_view/javascript_file.rb

Instance Attribute Summary

Attributes inherited from Element

#acceptable_children, #attributes, #children, #single_line, #tag

Instance Method Summary collapse

Methods inherited from Element

#<<, #add, #add_with_tag, #attr, #css_class=, #find_element_with_tag, #id=, #is_acceptable_child?, #on_click=, #render, #render_attributes, #render_children, #style=

Constructor Details

#initialize(file) ⇒ JavascriptFile

Returns a new instance of JavascriptFile.



7
8
9
10
11
12
13
# File 'lib/object_view/javascript_file.rb', line 7

def initialize(file)
  super()
  self.single_line = true
  attr("type", "text/javascript")
  attr("src", file)
  @tag = "script"
end