Module: FunRuby
- Extended by:
- FunRuby
- Included in:
- FunRuby
- Defined in:
- lib/fun_ruby.rb,
lib/fun_ruby/enum.rb,
lib/fun_ruby/file.rb,
lib/fun_ruby/hash.rb,
lib/fun_ruby/array.rb,
lib/fun_ruby/string.rb,
lib/fun_ruby/version.rb,
lib/fun_ruby/function.rb,
lib/fun_ruby/container.rb,
lib/fun_ruby/common/helpers.rb,
lib/fun_ruby/container/mixin.rb,
lib/fun_ruby/container/define.rb,
lib/fun_ruby/container/resolve.rb
Overview
Top-level
Defined Under Namespace
Modules: Array, Enum, File, Function, Hash, String Classes: Container
Constant Summary collapse
- PLACEHOLDER =
Object.new.freeze
- VERSION =
"0.0.1"
Class Method Summary collapse
-
._ ⇒ Object
A placeholder that helps to use not positioned currying.
-
.container ⇒ FunRuby::Container
Returns a global container.
-
.define(&block) ⇒ Object
Allows to define globally available functions.
-
.import(*aliases) ⇒ FunRuby::Container::Mixin
Allows to import global container to your classes and modules.
Instance Method Summary collapse
-
#_ ⇒ Object
A placeholder that helps to use not positioned currying.
-
#container ⇒ FunRuby::Container
Returns a global container.
-
#define(&block) ⇒ Object
Allows to define globally available functions.
-
#import(*aliases) ⇒ FunRuby::Container::Mixin
Allows to import global container to your classes and modules.
Class Method Details
._ ⇒ Object
A placeholder that helps to use not positioned currying
82 83 84 |
# File 'lib/fun_ruby.rb', line 82 def _ PLACEHOLDER end |
.container ⇒ FunRuby::Container
Returns a global container
34 35 36 |
# File 'lib/fun_ruby.rb', line 34 def container @container ||= Container.new end |
.define(&block) ⇒ Object
Allows to define globally available functions
25 26 27 |
# File 'lib/fun_ruby.rb', line 25 def define(&block) Container::Define.build(container: container).(&block) end |
.import(*aliases) ⇒ FunRuby::Container::Mixin
Allows to import global container to your classes and modules
77 78 79 |
# File 'lib/fun_ruby.rb', line 77 def import(*aliases) container.import(*aliases) end |
Instance Method Details
#_ ⇒ Object
A placeholder that helps to use not positioned currying
82 83 84 |
# File 'lib/fun_ruby.rb', line 82 def _ PLACEHOLDER end |
#container ⇒ FunRuby::Container
Returns a global container
34 35 36 |
# File 'lib/fun_ruby.rb', line 34 def container @container ||= Container.new end |
#define(&block) ⇒ Object
Allows to define globally available functions
25 26 27 |
# File 'lib/fun_ruby.rb', line 25 def define(&block) Container::Define.build(container: container).(&block) end |
#import(*aliases) ⇒ FunRuby::Container::Mixin
Allows to import global container to your classes and modules
77 78 79 |
# File 'lib/fun_ruby.rb', line 77 def import(*aliases) container.import(*aliases) end |