Class: ODDB::Util::Feedback
Constant Summary
Constants included from OddbUri
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#email_public ⇒ Object
Returns the value of attribute email_public.
-
#item_good_experience ⇒ Object
Returns the value of attribute item_good_experience.
-
#item_good_impression ⇒ Object
Returns the value of attribute item_good_impression.
-
#item_helps ⇒ Object
Returns the value of attribute item_helps.
-
#item_recommended ⇒ Object
Returns the value of attribute item_recommended.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#time ⇒ Object
Returns the value of attribute time.
Class Method Summary collapse
Methods inherited from Model
#__odba_delete__, #__odba_save__, _serializables, belongs_to, connections, connector, connectors, #data_origin, #data_origins, delegates, #delete, find_by_uid, has_many, is_coded, m10l_document, multilingual, #odba_serializables, #oid, on_delete, on_save, predicates, #save, #saved?, serializables, serialize, singular
Methods included from ODBA::Persistable
Methods included from Yaml
append_features, #to_yaml_properties
Methods included from OddbUri
#to_yaml, #to_yaml_map, #to_yaml_type
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def email @email end |
#email_public ⇒ Object
Returns the value of attribute email_public.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def email_public @email_public end |
#item_good_experience ⇒ Object
Returns the value of attribute item_good_experience.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def item_good_experience @item_good_experience end |
#item_good_impression ⇒ Object
Returns the value of attribute item_good_impression.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def item_good_impression @item_good_impression end |
#item_helps ⇒ Object
Returns the value of attribute item_helps.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def item_helps @item_helps end |
#item_recommended ⇒ Object
Returns the value of attribute item_recommended.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def item_recommended @item_recommended end |
#message ⇒ Object
Returns the value of attribute message.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def @message end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def name @name end |
#time ⇒ Object
Returns the value of attribute time.
10 11 12 |
# File 'lib/oddb/util/feedback.rb', line 10 def time @time end |
Class Method Details
.newest(count = 5) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/oddb/util/feedback.rb', line 12 def self.newest(count=5) sorted = all.sort_by { |instance| -instance.time.to_f } case count when Integer sorted[0,count] else sorted end end |