search for: to_yaml_properti

Displaying 6 results from an estimated 6 matches for "to_yaml_properti".

Did you mean: to_yaml_properties
2006 Jan 11
0
Limit attributes written out by to_yaml
...39;''' minimum_value: '''' item_id: 153 default_value: '''' ... many more fields However I don''t want all these fields. How can I limit the YAML output to just include the fields that I want? I know that I can override to_yaml_properties to specify the fields that i want from a class. But that really only lets me choose whether I want to export @attributes or not. I think that I could override to_yaml_properties of @attributes. Something like this class Item class <<@attributes def to_yaml_properties # .....
2006 Jan 12
0
yaml: custom saving and loading of specific classes
I''m trying to use ruby''s yaml library to serialise and deserialise some legacy classes. Simply adding a to_yaml_properties() method isn''t sufficient as special methods need to be called to get and set the properties (they''re not stored simply in instance variables that I can access), and I don''t want to change the class any more than I have to. Can anyone offer any pointers on how to ge...
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2006 Jun 30
6
RSS::Parser Documentation
Hi I am trying to use the RSS classes from "rss/2.0" and everything works but I want to know what attributes and properties I can get at from each of the classes I am getting back. For example, the class has a "channel" which I can tell has a "title" attribute (because it works when I query it :) but I would really like a list of every attribute that is
2005 Dec 27
3
myObject.send(column.name) from Agile Development book
I''m studying the Agile Development with Rails book. In the chapter that first sets up the depot application (page 68), there is this bit of code from a view: <% for product in @products %> <tr> <% for column in Product.content_columns %> <td><%=h product.send(column.name) %></td> <% end %> etc... I am trying to absorb both Ruby and
2010 Aug 25
18
Puppet hangs
Hello, we have one puppet server managing approx servers, all FreeBSD. The problem is that the puppet clients all hangs, one by one, eventually. They will run for anything between an hour up to a week. But eventually the all hang. We really like puppet and want to keep using it. But the way it is now is completely unusable. We''ve tried many versions, from 24.x, and now 2.6.1rc1. But