Sha256: 48360cc1edcb0789ec588a679ed6cbd2838c35db17d70a292a60395dfd1526d8
Contents?: true
Size: 694 Bytes
Versions: 2
Compression:
Stored size: 694 Bytes
Contents
module Convoy module Formatter class Options include Enumerable attr_reader :parser, :setup, :context def initialize(parser, setup, context) @parser = parser @setup = setup @context = context end def each(&block) parser.specs.each do |option_name, details| option = Option.new(option_name, details, setup, context) block.call(option) end end def count parser.specs.keys.size end alias_method :size, :count end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
convoy-1.3.2 | lib/convoy/formatter/options.rb |
convoy-1.2.0 | lib/convoy/formatter/options.rb |