Class: UniRails::App::Javascript
- Inherits:
-
Object
- Object
- UniRails::App::Javascript
- Includes:
- Singleton
- Defined in:
- lib/uni_rails/app/javascript.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#javascript ⇒ Object
Returns the value of attribute javascript.
Class Method Summary collapse
- .dependencies=(dependencies) ⇒ Object
- .imports ⇒ Object
- .javascript ⇒ Object
- .javascript=(content) ⇒ Object
Instance Method Summary collapse
- #imports ⇒ Object
-
#initialize ⇒ Javascript
constructor
A new instance of Javascript.
Constructor Details
#initialize ⇒ Javascript
Returns a new instance of Javascript.
23 24 25 26 |
# File 'lib/uni_rails/app/javascript.rb', line 23 def initialize @dependencies = {} @javascript = "" end |
Instance Attribute Details
#dependencies ⇒ Object
Returns the value of attribute dependencies.
22 23 24 |
# File 'lib/uni_rails/app/javascript.rb', line 22 def dependencies @dependencies end |
#javascript ⇒ Object
Returns the value of attribute javascript.
22 23 24 |
# File 'lib/uni_rails/app/javascript.rb', line 22 def javascript @javascript end |
Class Method Details
.dependencies=(dependencies) ⇒ Object
10 11 12 |
# File 'lib/uni_rails/app/javascript.rb', line 10 def self.dependencies=(dependencies) instance.dependencies = dependencies end |
.imports ⇒ Object
6 7 8 |
# File 'lib/uni_rails/app/javascript.rb', line 6 def self.imports instance.imports end |
.javascript ⇒ Object
14 15 16 |
# File 'lib/uni_rails/app/javascript.rb', line 14 def self.javascript instance.javascript end |
.javascript=(content) ⇒ Object
18 19 20 |
# File 'lib/uni_rails/app/javascript.rb', line 18 def self.javascript=(content) instance.javascript = content end |
Instance Method Details
#imports ⇒ Object
28 29 30 |
# File 'lib/uni_rails/app/javascript.rb', line 28 def imports { imports: dependencies } end |