Skip to content

Commit

Permalink
Cleaned up explicit nil code a wee bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Feb 6, 2013
1 parent 62ecbd3 commit e6554d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lib/builder/xmlbase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ def initialize(indent=0, initial=0, encoding='utf-8')
@level = initial
@encoding = encoding.downcase
end

def explicit_nil_handling?
if @explicit_nil_handling == true
true
else
false
end
@explicit_nil_handling
end

# Create a tag named +sym+. Other than the first argument which
Expand Down
2 changes: 1 addition & 1 deletion lib/builder/xmlmarkup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class XmlMarkup < XmlBase
def initialize(options={})
indent = options[:indent] || 0
margin = options[:margin] || 0
@explicit_nil_handling = options[:explicit_nil_handling] || false
@explicit_nil_handling = options[:explicit_nil_handling]
super(indent, margin)
@target = options[:target] || ""
end
Expand Down

0 comments on commit e6554d2

Please sign in to comment.