Class: SampleModels::Sampler::ConfigureRecipient::Attribute
- Inherits:
-
Object
- Object
- SampleModels::Sampler::ConfigureRecipient::Attribute
- Defined in:
- lib/sample_models/sampler.rb
Instance Method Summary collapse
- #default(default) ⇒ Object
- #default_class(dc) ⇒ Object
- #force_email_format ⇒ Object
- #force_unique ⇒ Object
-
#initialize(sampler, attribute) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(sampler, attribute) ⇒ Attribute
Returns a new instance of Attribute.
83 84 85 |
# File 'lib/sample_models/sampler.rb', line 83 def initialize(sampler, attribute) @sampler, @attribute = sampler, attribute end |
Instance Method Details
#default(default) ⇒ Object
87 88 89 |
# File 'lib/sample_models/sampler.rb', line 87 def default(default) @sampler.defaults[@attribute] = default end |
#default_class(dc) ⇒ Object
91 92 93 |
# File 'lib/sample_models/sampler.rb', line 91 def default_class(dc) @sampler.polymorphic_default_classes[@attribute] = dc end |
#force_email_format ⇒ Object
95 96 97 |
# File 'lib/sample_models/sampler.rb', line 95 def force_email_format @sampler.force_email_format(@attribute) end |
#force_unique ⇒ Object
99 100 101 |
# File 'lib/sample_models/sampler.rb', line 99 def force_unique @sampler.force_unique(@attribute) end |