lib/rcap/cap_1_0/info.rb in rcap-1.2.0 vs lib/rcap/cap_1_0/info.rb in rcap-1.2.1
- old
+ new
@@ -137,10 +137,11 @@
attr_reader( :areas )
def initialize( attributes = {} )
@language = attributes[ :language ] || DEFAULT_LANGUAGE
@categories = Array( attributes[ :categories ])
+ @audience = attributes [ :audience ]
@event = attributes [ :event ]
@urgency = attributes[ :urgency ]
@severity = attributes[ :severity ]
@certainty = attributes[ :certainty ]
@effective = attributes[ :effective ]
@@ -308,16 +309,13 @@
PARAMETERS_YAML = 'Parameters' # :nodoc:
RESOURCES_YAML = 'Resources' # :nodoc:
AREAS_YAML = 'Areas' # :nodoc:
def to_yaml( options = {} ) # :nodoc:
- categories_yaml = self.categories
- def categories_yaml.to_yaml_style; :inline; end
-
parameter_to_hash = lambda{ |hash, parameter| hash.merge( parameter.name => parameter.value )}
RCAP.attribute_values_to_hash( [ LANGUAGE_YAML, self.language ],
- [ CATEGORIES_YAML, categories_yaml ],
+ [ CATEGORIES_YAML, self.categories ],
[ EVENT_YAML, self.event ],
[ URGENCY_YAML, self.urgency ],
[ SEVERITY_YAML, self.severity ],
[ CERTAINTY_YAML, self.certainty ],
[ AUDIENCE_YAML, self.audience ],