Class: Versions::Configurable::Config
- Inherits:
-
Object
- Object
- Versions::Configurable::Config
- Defined in:
- lib/versions/configurable.rb
Overview
A simple configuration wrapper
Constant Summary collapse
- BASE_DIR =
The default base directory path
File.join(Dir.pwd, 'lib')
- VERSION_PATTERN =
The default filename pattern
/v(?:ersion)?[-_]?((\d+(?:\.\d+)*))/i
- CLASS_PREFIX =
The default class prefix
'V'
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
Returns the value of attribute base_dir.
-
#class_prefix ⇒ Object
Returns the value of attribute class_prefix.
-
#version_pattern ⇒ Object
Returns the value of attribute version_pattern.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
Public: Create a new instance with default values.
Constructor Details
#initialize ⇒ Config
Public: Create a new instance with default values
Returns a new instance
18 19 20 21 22 |
# File 'lib/versions/configurable.rb', line 18 def initialize self.base_dir = BASE_DIR self.version_pattern = VERSION_PATTERN self.class_prefix = CLASS_PREFIX end |
Instance Attribute Details
#base_dir ⇒ Object
Returns the value of attribute base_dir.
6 7 8 |
# File 'lib/versions/configurable.rb', line 6 def base_dir @base_dir end |
#class_prefix ⇒ Object
Returns the value of attribute class_prefix.
6 7 8 |
# File 'lib/versions/configurable.rb', line 6 def class_prefix @class_prefix end |
#version_pattern ⇒ Object
Returns the value of attribute version_pattern.
6 7 8 |
# File 'lib/versions/configurable.rb', line 6 def version_pattern @version_pattern end |