aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-01-23 00:26:22 -0600
committerJack Nagel2013-01-26 11:37:01 -0600
commit4062559acb96f9b8c7e33ef99deb548ce73d6d6e (patch)
treed8c8a94d05411dd31d1e376ff23cc5ced502d74d /Library
parenta5471a0cb0f461600bc9bfb9f9feb3825c124b84 (diff)
downloadbrew-4062559acb96f9b8c7e33ef99deb548ce73d6d6e.tar.bz2
Options can be dumped as JSON
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_support.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb
index caf82f765..d4e6a1476 100644
--- a/Library/Homebrew/formula_support.rb
+++ b/Library/Homebrew/formula_support.rb
@@ -177,6 +177,10 @@ class Option
end
alias_method :to_str, :to_s
+ def to_json
+ flag.inspect
+ end
+
def eql?(other)
@name == other.name
end