Class: UniRails::App::Javascript

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/uni_rails/app/javascript.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJavascript

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

#dependenciesObject

Returns the value of attribute dependencies.



22
23
24
# File 'lib/uni_rails/app/javascript.rb', line 22

def dependencies
  @dependencies
end

#javascriptObject

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

.importsObject



6
7
8
# File 'lib/uni_rails/app/javascript.rb', line 6

def self.imports
  instance.imports
end

.javascriptObject



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

#importsObject



28
29
30
# File 'lib/uni_rails/app/javascript.rb', line 28

def imports
  { imports: dependencies }
end