lib/nanoc/base/plugin.rb in nanoc-2.1.4 vs lib/nanoc/base/plugin.rb in nanoc-2.1.5

- old
+ new

@@ -17,11 +17,13 @@ # When given a list of identifier symbols, sets the identifiers for # this plugin. When given nothing, returns an array of identifier # symbols for this plugin. def identifiers(*identifiers) # Initialize - @identifiers = [] unless instance_variables.include?('@identifiers') + if !instance_variables.include?('@identifiers') && !instance_variables.include?(:'@identifiers') + @identifiers = [] + end if identifiers.empty? @identifiers else @identifiers = identifiers @@ -33,10 +35,12 @@ # # When given an identifier symbols, sets the identifier for this plugin. # When given nothing, returns the identifier for this plugin. def identifier(identifier=nil) # Initialize - @identifiers = [] unless instance_variables.include?('@identifiers') + if !instance_variables.include?('@identifiers') && !instance_variables.include?(:'@identifiers') + @identifiers = [] + end if identifier.nil? @identifiers.first else @identifiers = [ identifier ]