lib/csl/style/label.rb in csl-1.0.0.pre21 vs lib/csl/style/label.rb in csl-1.0.0.pre22

- old
+ new

@@ -34,20 +34,18 @@ # @return [Hash<String, String>] a cache for variable-term mapping attr_reader :terms end def has_variable? - return parent.has_variable? if names_label? attribute?(:variable) end # The value of the node's variable attribute. If the {Label} # is the child of a {Names} node, returns the parent's variable # attribute instead. # - # @return [String] the value of the node's variable attribute + # @return [String, nil] the value of the node's variable attribute def variable - return parent.variable if name_label? attributes[:variable] end Label.variables.each do |type| pattern = Regexp.new("^#{type}", true) \ No newline at end of file