Module: UniRails

Defined in:
lib/uni_rails.rb,
lib/uni_rails/app.rb,
lib/uni_rails/app/css.rb,
lib/uni_rails/helpers.rb,
lib/uni_rails/version.rb,
lib/uni_rails/app/views.rb,
lib/uni_rails/app/javascript.rb,
lib/uni_rails/helpers/css_helper.rb,
lib/uni_rails/helpers/javascript_helper.rb

Defined Under Namespace

Modules: Helpers Classes: App, Error

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.css(content) ⇒ Object



35
36
37
# File 'lib/uni_rails.rb', line 35

def self.css(content)
  UniRails::App::CSS.css = content
end

.import_maps(dependencies) ⇒ Object



27
28
29
# File 'lib/uni_rails.rb', line 27

def self.import_maps(dependencies)
  UniRails::App::Javascript.dependencies = dependencies
end

.javascript(content) ⇒ Object



31
32
33
# File 'lib/uni_rails.rb', line 31

def self.javascript(content)
  UniRails::App::Javascript.javascript = content
end

.register_view(action, view) ⇒ Object



16
17
18
# File 'lib/uni_rails.rb', line 16

def self.register_view(action, view)
  UniRails::App::Views.instance.views[action] = view
end

.run(**webrick_options) ⇒ Object



20
21
22
23
24
25
# File 'lib/uni_rails.rb', line 20

def self.run(**webrick_options)
  App.initialize!
  # Rackup::Handler::WEBrick.run App, **webrick_options
  # Rackup::Handler::Falcon.run App, **webrick_options
  Rack::Handler::Puma.run App, **webrick_options
end