Class: Teodoro::Empresa::ContratosDeEmprego::Contrato
- Inherits:
-
Object
- Object
- Teodoro::Empresa::ContratosDeEmprego::Contrato
- Extended by:
- Forwardable
- Defined in:
- lib/teodoro/empresa/contratos_de_emprego.rb
Instance Attribute Summary collapse
-
#afastamento ⇒ Object
Returns the value of attribute afastamento.
-
#data_de_desligamento ⇒ Object
writeonly
Sets the attribute data_de_desligamento.
Instance Method Summary collapse
Instance Attribute Details
#afastamento ⇒ Object
Returns the value of attribute afastamento.
49 50 51 |
# File 'lib/teodoro/empresa/contratos_de_emprego.rb', line 49 def afastamento @afastamento end |
#data_de_desligamento=(value) ⇒ Object
Sets the attribute data_de_desligamento
51 52 53 |
# File 'lib/teodoro/empresa/contratos_de_emprego.rb', line 51 def data_de_desligamento=(value) @data_de_desligamento = value end |
Instance Method Details
#ativo?(data) ⇒ Boolean
53 54 55 |
# File 'lib/teodoro/empresa/contratos_de_emprego.rb', line 53 def ativo?(data) data_de_admissao <= data && (!data_de_desligamento || data_de_desligamento >= data) end |