Class: OptparseLite::Np
- Inherits:
-
Object
- Object
- OptparseLite::Np
- Includes:
- Lingual
- Defined in:
- lib/optparse-lite.rb
Instance Method Summary collapse
-
#initialize(art, root, count = nil, &block) ⇒ Np
constructor
A new instance of Np.
- #to_str ⇒ Object (also: #to_s)
Methods included from Lingual
Constructor Details
#initialize(art, root, count = nil, &block) ⇒ Np
Returns a new instance of Np.
951 952 953 954 955 956 |
# File 'lib/optparse-lite.rb', line 951 def initialize art, root, count=nil, &block fail('blah blah for now') if block_given? && ! block.arity.zero? fail('count and block mutually exclusive, one required') unless 1 == [count, block].compact.size @art, @root, @block, @count, @list = art, root, block, count, nil end |
Instance Method Details
#to_str ⇒ Object Also known as: to_s
957 958 959 960 961 |
# File 'lib/optparse-lite.rb', line 957 def to_str [ surface_article, surface_root, surface_items ].compact.join(' ') end |