Class: Module
- Defined in:
- lib/roby/support.rb,
lib/roby/planning/model.rb,
lib/roby/distributed/protocol.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#define_under(name, value = nil) ⇒ Object
Defines a new constant under a given module :call-seq define_under(name, value) -> value define_under(name) { … } -> value.
- #droby_dump(dest) ⇒ Object
- #planning_library(default_options = Hash.new) ⇒ Object
Instance Method Details
#define_under(name, value = nil) ⇒ Object
Defines a new constant under a given module :call-seq
define_under(name, value) -> value
define_under(name) { ... } -> value
In the first form, the method gets its value from its argument. In the second case, it calls the provided block
55 56 57 58 59 60 61 |
# File 'lib/roby/support.rb', line 55 def define_under(name, value = nil) if old = constants.find { |cn| cn == name.to_s } return const_get(old) else const_set(name, (value || yield)) end end |
#droby_dump(dest) ⇒ Object
43 44 45 |
# File 'lib/roby/distributed/protocol.rb', line 43 def droby_dump(dest) raise "can't dump modules" end |
#planning_library(default_options = Hash.new) ⇒ Object
901 902 903 904 |
# File 'lib/roby/planning/model.rb', line 901 def planning_library( = Hash.new) extend Roby::Planning::Library instance_variable_set(:@default_options, ) end |