Class: DYI::Script::ScriptReference
- Inherits:
-
SimpleScript
- Object
- SimpleScript
- DYI::Script::ScriptReference
- Defined in:
- lib/dyi/script/simple_script.rb
Overview
Class representing a referenct of external client-script-file. The scripting becomes effective only when it is output by SVG format.
Instance Attribute Summary collapse
-
#href ⇒ String
readonly
A path of external script file.
Attributes inherited from SimpleScript
Instance Method Summary collapse
-
#has_uri_reference? ⇒ Boolean
Returns whether this script contains reference of external script file.
-
#include_external_file? ⇒ Boolean
Returns whether this script contains reference of external script file.
-
#initialize(href, content_type = 'application/ecmascript') ⇒ ScriptReference
constructor
A new instance of ScriptReference.
Methods inherited from SimpleScript
#append_body, #contents, #write_as
Constructor Details
#initialize(href, content_type = 'application/ecmascript') ⇒ ScriptReference
Returns a new instance of ScriptReference.
87 88 89 90 |
# File 'lib/dyi/script/simple_script.rb', line 87 def initialize(href, content_type = 'application/ecmascript') super(nil, content_type) @href = href end |
Instance Attribute Details
#href ⇒ String (readonly)
Returns a path of external script file.
85 86 87 |
# File 'lib/dyi/script/simple_script.rb', line 85 def href @href end |
Instance Method Details
#has_uri_reference? ⇒ Boolean
Returns whether this script contains reference of external script file.
100 101 102 |
# File 'lib/dyi/script/simple_script.rb', line 100 def has_uri_reference? true end |
#include_external_file? ⇒ Boolean
Returns whether this script contains reference of external script file.
94 95 96 |
# File 'lib/dyi/script/simple_script.rb', line 94 def include_external_file? true end |