Class: DateAttribute
- Inherits:
-
ContactAttribute
- Object
- LogicalModel
- ContactAttribute
- DateAttribute
- Defined in:
- app/models/date_attribute.rb
Constant Summary
Constants inherited from ContactAttribute
ContactAttribute::AVAILABLE_TYPES
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#primary ⇒ Object
Returns the value of attribute primary.
-
#public ⇒ Object
Returns the value of attribute public.
Instance Method Summary collapse
- #_type ⇒ Object
-
#is_a_complete_birthday? ⇒ Boolean
Is this a birthday with year?.
Methods inherited from ContactAttribute
#_create, #always_public?, #id, #id=, #json_root, #new_record?, #to_key
Methods included from ContactAttribute::CustomKeys
#async_custom_keys, #custom_keys
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
10 11 12 |
# File 'app/models/date_attribute.rb', line 10 def category @category end |
#primary ⇒ Object
Returns the value of attribute primary.
10 11 12 |
# File 'app/models/date_attribute.rb', line 10 def primary @primary end |
#public ⇒ Object
Returns the value of attribute public.
10 11 12 |
# File 'app/models/date_attribute.rb', line 10 def public @public end |
Instance Method Details
#_type ⇒ Object
16 17 18 |
# File 'app/models/date_attribute.rb', line 16 def _type self.class.name end |
#is_a_complete_birthday? ⇒ Boolean
Is this a birthday with year?
22 23 24 |
# File 'app/models/date_attribute.rb', line 22 def is_a_complete_birthday? self.category == 'birthday' && !self.year.blank? && self.year!='-' end |