Class: Teodoro::Empresa::ContratosDeTrabalhoSemVinculo::Contrato

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/teodoro/empresa/contratos_de_trabalho_sem_vinculo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#afastamentoObject

Returns the value of attribute afastamento.



65
66
67
# File 'lib/teodoro/empresa/contratos_de_trabalho_sem_vinculo.rb', line 65

def afastamento
  @afastamento
end

#data_do_termino=(value) ⇒ Object

Sets the attribute data_do_termino

Parameters:

  • value

    the value to set the attribute data_do_termino to.



67
68
69
# File 'lib/teodoro/empresa/contratos_de_trabalho_sem_vinculo.rb', line 67

def data_do_termino=(value)
  @data_do_termino = value
end

Instance Method Details

#ativo?(data) ⇒ Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/teodoro/empresa/contratos_de_trabalho_sem_vinculo.rb', line 69

def ativo?(data)
  data_de_inicio <= data && (!data_do_termino || data_do_termino >= data)
end