Module: Walnut
- Defined in:
- lib/walnut/shell.rb,
lib/walnut.rb,
lib/walnut/events.rb,
lib/walnut/version.rb,
lib/walnut/configuration.rb,
lib/walnut/input/readline.rb,
lib/walnut/output/standard.rb
Overview
Copyright © 2013, Autumn Perrault, Matthew Carey All rights reserved. Distributed under the terms of the MIT license (see LICENSE.md).
Defined Under Namespace
Modules: Input, Output Classes: Configuration, Events, Shell
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
- .[](key) ⇒ Object
- .[]=(key, value) ⇒ Object
-
.config ⇒ Walnut::Configuration
Make a globally accessible configuration that general configuration will go.
- .configure {|Walnut.config| ... } ⇒ Object
-
.ev ⇒ Object
Setup events in Walnut as Walnut.ev.
Class Method Details
.[](key) ⇒ Object
51 52 53 |
# File 'lib/walnut/configuration.rb', line 51 def self.[](key) self.config.send(key) end |
.[]=(key, value) ⇒ Object
55 56 57 |
# File 'lib/walnut/configuration.rb', line 55 def self.[]=(key, value) self.config.send(key.to_s << "=", value) end |
.config ⇒ Walnut::Configuration
Make a globally accessible configuration that general configuration will go
46 47 48 49 |
# File 'lib/walnut/configuration.rb', line 46 def self.config # Ensure we have the same object every time. @walnut_global_configuration||=Configuration.new end |