Class: Teodoro::ArquivoData::ChavesValores::Item
- Inherits:
-
Object
- Object
- Teodoro::ArquivoData::ChavesValores::Item
- Defined in:
- lib/teodoro/arquivo_data.rb
Defined Under Namespace
Classes: Valor
Instance Attribute Summary collapse
-
#chave ⇒ Object
readonly
Returns the value of attribute chave.
-
#valor ⇒ Object
readonly
Returns the value of attribute valor.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Item
constructor
A new instance of Item.
- #selecionar? ⇒ Boolean
Constructor Details
#initialize(*args) ⇒ Item
Returns a new instance of Item.
117 118 119 120 121 |
# File 'lib/teodoro/arquivo_data.rb', line 117 def initialize(*args) @chave = args[0] @valor = Valor.new(args[1], formato: args.size == 1 ? :vazio : args[2]) @opcoes = args[3] || {} end |
Instance Attribute Details
#chave ⇒ Object (readonly)
Returns the value of attribute chave.
123 124 125 |
# File 'lib/teodoro/arquivo_data.rb', line 123 def chave @chave end |
#valor ⇒ Object (readonly)
Returns the value of attribute valor.
123 124 125 |
# File 'lib/teodoro/arquivo_data.rb', line 123 def valor @valor end |
Instance Method Details
#selecionar? ⇒ Boolean
125 126 127 |
# File 'lib/teodoro/arquivo_data.rb', line 125 def selecionar? !valor.vazio? || opcoes[:manter_se_vazio] end |