Class: FiltrosPersonalizados::FieldsPadroes::TrueOrFalse

Inherits:
Field
  • Object
show all
Defined in:
lib/filtros_personalizados/fields_padroes/true_or_false.rb

Constant Summary

Constants inherited from Field

Field::DIFERENTE, Field::ENTRE, Field::IGUAL, Field::MAIOR_QUE, Field::MENOR_QUE, Field::NENHUM, Field::TODOS

Instance Attribute Summary collapse

Attributes inherited from Field

#association, #autocomplete_path, #collection, #collection_id, #collection_name, #field_name, #field_type, #is_open, #noactions, #options, #partial_name, #relation, #tipo_selecionado, #values

Instance Method Summary collapse

Methods inherited from Field

#caption

Constructor Details

#initialize(relation, field_name, args = {}) ⇒ TrueOrFalse

utilizado para criar opções de seleção para classe boolean



8
9
10
11
# File 'lib/filtros_personalizados/fields_padroes/true_or_false.rb', line 8

def initialize(relation, field_name, args={})
  self.id   = args[:id]
  self.nome = args[:nome]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/filtros_personalizados/fields_padroes/true_or_false.rb', line 5

def id
  @id
end

#nomeObject

Returns the value of attribute nome.



5
6
7
# File 'lib/filtros_personalizados/fields_padroes/true_or_false.rb', line 5

def nome
  @nome
end