Class: Clir::DataManager::Manager::Displayer
- Inherits:
-
Object
- Object
- Clir::DataManager::Manager::Displayer
- Defined in:
- lib/clir/data_manager/Displayer.rb
Instance Attribute Summary collapse
-
#manager ⇒ Object
readonly
Returns the value of attribute manager.
Instance Method Summary collapse
-
#initialize(manager) ⇒ Displayer
constructor
A new instance of Displayer.
- #show(instance, options) ⇒ Object
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
#manager ⇒ Object (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, ) 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 |