Module: Bowline

Defined in:
lib/bowline/generators.rb,
lib/bowline.rb,
lib/bowline/binders.rb,
lib/bowline/desktop.rb,
lib/bowline/helpers.rb,
lib/bowline/library.rb,
lib/bowline/logging.rb,
lib/bowline/version.rb,
lib/bowline/watcher.rb,
lib/bowline/platform.rb,
lib/bowline/app_config.rb,
lib/bowline/desktop/js.rb,
lib/bowline/desktop/app.rb,
lib/bowline/initializer.rb,
lib/bowline/desktop/dock.rb,
lib/bowline/desktop/host.rb,
lib/bowline/desktop/misc.rb,
lib/bowline/desktop/path.rb,
lib/bowline/desktop/proxy.rb,
lib/bowline/desktop/sound.rb,
lib/bowline/desktop/bridge.rb,
lib/bowline/desktop/dialog.rb,
lib/bowline/desktop/window.rb,
lib/bowline/desktop/network.rb,
lib/bowline/desktop/runtime.rb,
lib/bowline/binders/observer.rb,
lib/bowline/binders/singleton.rb,
lib/bowline/desktop/clipboard.rb,
lib/bowline/binders/collection.rb,
lib/bowline/desktop/window_manager.rb,
lib/bowline/desktop/window_methods.rb

Overview

Templater

Defined Under Namespace

Modules: Base, Binders, Desktop, Generators, Helpers, Library, Logging, Platform, Version Classes: AppConfig, Configuration, Initializer, OrderedOptions, Watcher

Class Method Summary collapse

Class Method Details

.assets_pathObject



43
44
45
# File 'lib/bowline/initializer.rb', line 43

def assets_path
  File.join(library_path, "assets")
end

.configurationObject Also known as: conf

The Configuration instance used to configure the Bowline environment



7
8
9
# File 'lib/bowline/initializer.rb', line 7

def configuration
  @@configuration
end

.configuration=(configuration) ⇒ Object

:nodoc:



12
13
14
# File 'lib/bowline/initializer.rb', line 12

def configuration=(configuration) #:nodoc:
  @@configuration = configuration
end

.envObject



47
48
49
# File 'lib/bowline/initializer.rb', line 47

def env
  @env ||= ActiveSupport::StringInquirer.new(ENV["APP_ENV"] || "development")
end

.initialized=(initialized) ⇒ Object

:nodoc:



20
21
22
# File 'lib/bowline/initializer.rb', line 20

def initialized=(initialized) #:nodoc:
  @initialized ||= initialized
end

.initialized?Boolean

Returns:

  • (Boolean)


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

def initialized?
  @initialized || false
end

.irb?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/bowline/initializer.rb', line 51

def irb?
  !!ENV["APP_IRB"]
end

.library_pathObject



10
11
12
13
14
# File 'lib/bowline.rb', line 10

def library_path
  File.expand_path(
    File.join(File.dirname(__FILE__), "..")
  )
end

.loggerObject

The default Bowline logger. Also see the Bowline::Logging class.



26
27
28
29
30
31
32
# File 'lib/bowline/initializer.rb', line 26

def logger
  if defined?(BOWLINE_LOGGER)
    BOWLINE_LOGGER
  else
    nil
  end
end

.public_pathObject



39
40
41
# File 'lib/bowline/initializer.rb', line 39

def public_path
  root && root.join("public")
end

.rootObject

The application’s root



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

def root
  Pathname.new(APP_ROOT) if defined?(APP_ROOT)
end