lib/mattock/configurable.rb in mattock-0.1.0 vs lib/mattock/configurable.rb in mattock-0.1.1
- old
+ new
@@ -81,9 +81,13 @@
setting(name)
end
end
alias required_field required_fields
+ # @macro [attack] configurable_property
+ # @method $1
+ # @return [$2] The default value of $1
+ # @method $1=
def setting(name, default_value = RequiredField)
name = name.to_sym
attr_accessor(name)
if default_values.has_key?(name) and default_values[name] != default_value
warn "Changing default value of #{self.name}##{name} from #{default_values[name].inspect} to #{default_value.inspect}"