Module: Bowline

Defined in:
lib/bowline/observer.rb,
lib/bowline.rb,
lib/bowline/async.rb,
lib/bowline/jquery.rb,
lib/bowline/window.rb,
lib/bowline/binders.rb,
lib/bowline/helpers.rb,
lib/bowline/version.rb,
lib/bowline/generators.rb,
lib/bowline/initializer.rb,
lib/bowline/binders/singleton.rb,
lib/bowline/binders/collection.rb

Overview

o = Observable.new o.append(‘greet’)

puts 'hi'

o.call(‘greet’)

def greet(who)

puts "Hi #{who}"

end event = o.append(‘greet’, method(:greet), ‘Alex’) o.call(‘greet’) event.remove

Defined Under Namespace

Modules: Async, Binders, Generators, Helpers, Version Classes: Base, Configuration, Initializer, JQuery, Observable, OrderedOptions, Window

Class Method Summary collapse

Class Method Details

.configurationObject

The Configuration instance used to configure the Bowline environment



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

def configuration
  @@configuration
end

.configuration=(configuration) ⇒ Object



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

def configuration=(configuration)
  @@configuration = configuration
end

.initialized=(initialized) ⇒ Object



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

def initialized=(initialized)
  @initialized ||= initialized
end

.initialized?Boolean

Returns:

  • (Boolean)


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

def initialized?
  @initialized || false
end

.jsObject

The raw JavaScript window object



5
6
7
# File 'lib/bowline.rb', line 5

def self.js
  Window.new
end

.loggerObject



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

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

.rootObject



32
33
34
# File 'lib/bowline/initializer.rb', line 32

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

.show_view(name) ⇒ Object

Change which page we’re on



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

def self.show_view(name)
  js.location = "app://public/#{name}.html"
end