Module: ObjectMomma::Config
- Included in:
- ObjectMomma
- Defined in:
- lib/object_momma/config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #builder_path=(path) ⇒ Object
- #serialized_attributes_path=(path) ⇒ Object
- #use_serialized_attributes=(true_or_false) ⇒ Object
Class Method Details
.extended(base) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/object_momma/config.rb', line 3 def self.extended(base) base.singleton_class.instance_eval do attr_reader :builder_path attr_reader :serialized_attributes_path, :use_serialized_attributes end end |
Instance Method Details
#builder_path=(path) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/object_momma/config.rb', line 10 def builder_path=(path) unless path.nil? || File.directory?(path) raise ArgumentError, "`#{path}' is not a valid directory" end @builder_path = path end |
#serialized_attributes_path=(path) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/object_momma/config.rb', line 17 def serialized_attributes_path=(path) unless File.directory?(path) raise ArgumentError, "`#{path}' is not a valid directory" end @serialized_attributes_path = path end |
#use_serialized_attributes=(true_or_false) ⇒ Object
24 25 26 |
# File 'lib/object_momma/config.rb', line 24 def use_serialized_attributes=(true_or_false) @use_serialized_attributes = true_or_false ? true : false end |