Class: Autodoc::Configuration
- Inherits:
-
Object
- Object
- Autodoc::Configuration
- Defined in:
- lib/autodoc/configuration.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.property(name, &default) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/autodoc/configuration.rb', line 4 def property(name, &default) define_method(name) do if instance_variable_defined?("@#{name}") instance_variable_get("@#{name}") else instance_variable_set("@#{name}", instance_exec(&default)) end end attr_writer name end |
Instance Method Details
#pathname ⇒ Object
52 53 54 |
# File 'lib/autodoc/configuration.rb', line 52 def pathname Pathname.new(path) end |