Class: Telephone

Inherits:
ContactAttribute show all
Includes:
ActiveModel::Validations::Callbacks
Defined in:
app/models/telephone.rb

Constant Summary

Constants inherited from ContactAttribute

ContactAttribute::AVAILABLE_TYPES

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#categoryObject

Returns the value of attribute category.



13
14
15
# File 'app/models/telephone.rb', line 13

def category
  @category
end

#primaryObject

Returns the value of attribute primary.



13
14
15
# File 'app/models/telephone.rb', line 13

def primary
  @primary
end

#publicObject

Returns the value of attribute public.



13
14
15
# File 'app/models/telephone.rb', line 13

def public
  @public
end

#valueObject

Returns the value of attribute value.



13
14
15
# File 'app/models/telephone.rb', line 13

def value
  @value
end

Instance Method Details

#_typeObject



22
23
24
# File 'app/models/telephone.rb', line 22

def _type
  self.class.name
end

#masked?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/telephone.rb', line 18

def masked?
  value.present? && value.last == '#'
end