Module: Jsimple

Defined in:
lib/jsimple.rb,
lib/jsimple/builder.rb,
lib/jsimple/railtie.rb,
lib/jsimple/version.rb,
lib/jsimple/rails_view_helper.rb

Defined Under Namespace

Modules: RailsViewHelper Classes: Builder, JsimpleRailtie

Constant Summary collapse

DEFAULT_HOST =

Config

'localhost'
DEFAULT_PORT =
'3100'
DEFAULT_DEVELOPMENT =
defined?(Rails) ? Rails.env.development? : false
DEFAULT_JS_START_COMMAND =
'start'
VERSION =
'0.4.0'

Class Method Summary collapse

Class Method Details

.app(name, props: {}, id: nil) ⇒ Object



9
10
11
# File 'lib/jsimple.rb', line 9

def self.app(name, props: {}, id: nil)
  Builder.app_factory(name, props, id)
end

.developmentObject



57
58
59
# File 'lib/jsimple.rb', line 57

def self.development
  @development
end

.development=(development) ⇒ Object



41
42
43
# File 'lib/jsimple.rb', line 41

def self.development=(development)
  @development = development
end

.hostObject



49
50
51
# File 'lib/jsimple.rb', line 49

def self.host
  @host
end

.host=(host) ⇒ Object



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

def self.host=(host)
  HotReloadProxy::Config.host = host
  @host = host
end

.init(*args) ⇒ Object



17
18
19
# File 'lib/jsimple.rb', line 17

def self.init(*args)
  app(*args).init
end

.js_start_commandObject



61
62
63
# File 'lib/jsimple.rb', line 61

def self.js_start_command
  @js_start_command
end

.js_start_command=(js_start_command) ⇒ Object



45
46
47
# File 'lib/jsimple.rb', line 45

def self.js_start_command=(js_start_command)
  @js_start_command = js_start_command
end

.path(*args) ⇒ Object



13
14
15
# File 'lib/jsimple.rb', line 13

def self.path(*args)
  app(*args).path
end

.portObject



53
54
55
# File 'lib/jsimple.rb', line 53

def self.port
  @port
end

.port=(port) ⇒ Object



36
37
38
39
# File 'lib/jsimple.rb', line 36

def self.port=(port)
  HotReloadProxy::Config.port = port
  @port = port
end

.reset!Object



65
66
67
68
69
70
# File 'lib/jsimple.rb', line 65

def self.reset!
  @host = DEFAULT_HOST
  @port = DEFAULT_PORT
  @development = DEFAULT_DEVELOPMENT
  @js_start_command = DEFAULT_JS_START_COMMAND
end