lib/csl/style/text.rb in csl-1.0.0.pre21 vs lib/csl/style/text.rb in csl-1.0.0.pre22
- old
+ new
@@ -5,42 +5,42 @@
attr_struct :variable, :macro, :term, :form, :plural, :value,
*Schema.attr(:formatting, :display, :quotes, :periods)
has_no_children
- def has_variable?
- attribute?(:variable)
- end
+ def has_variable?
+ attribute?(:variable)
+ end
- def variable
- attributes[:variable]
- end
-
- def variable_options
- attributes_for :form
- end
+ def variable
+ attributes[:variable]
+ end
+
+ def variable_options
+ attributes_for :form
+ end
- def has_macro?
- attribute?(:macro)
- end
+ def has_macro?
+ attribute?(:macro)
+ end
- # @return [Macro, nil]
- def macro
- raise unless parent.respond_to?(:macros)
- parent.macros[attributes[:macro]]
- end
+ # @return [Macro, nil]
+ def macro
+ raise unless parent.respond_to?(:macros)
+ parent.macros[attributes[:macro]]
+ end
- def has_term?
- attribute?(:term)
- end
+ def has_term?
+ attribute?(:term)
+ end
- def has_value?
- attribute?(:value)
- end
+ def has_value?
+ attribute?(:value)
+ end
- def value
- attributes[:value]
- end
+ def value
+ attributes[:value]
+ end
end
end
end
\ No newline at end of file