Class: Clir::DataManager::Manager::Displayer

Inherits:
Object
  • Object
show all
Defined in:
lib/clir/data_manager/Displayer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(manager) ⇒ Displayer

Returns a new instance of Displayer.



13
14
15
# File 'lib/clir/data_manager/Displayer.rb', line 13

def initialize(manager)
  @manager = manager    
end

Instance Attribute Details

#managerObject (readonly)

Returns the value of attribute manager.



11
12
13
# File 'lib/clir/data_manager/Displayer.rb', line 11

def manager
  @manager
end

Instance Method Details

#show(instance, options) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/clir/data_manager/Displayer.rb', line 17

def show(instance, options)
  liste = []
  manager.each_property do |property|
    next if not(property.displayable?(instance))
    # puts "Je dois afficher la propriété @#{property.prop} de specs #{property.specs}"
    liste << [property.name, property.formated_value_in(instance)]
  end
  puts labelize(liste)
end