Class: Shaf::Yard::Parser
- Inherits:
-
Object
- Object
- Shaf::Yard::Parser
- Defined in:
- lib/shaf/yard/parser.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ Parser
constructor
A new instance of Parser.
- #parse! ⇒ Object
Constructor Details
#initialize(name) ⇒ Parser
Returns a new instance of Parser.
10 11 12 |
# File 'lib/shaf/yard/parser.rb', line 10 def initialize(name) @name = name.downcase end |
Class Method Details
.call(name: '') ⇒ Object
6 7 8 |
# File 'lib/shaf/yard/parser.rb', line 6 def self.call(name: '') new(name).parse! end |
Instance Method Details
#parse! ⇒ Object
14 15 16 17 |
# File 'lib/shaf/yard/parser.rb', line 14 def parse! verify_exists! unless name.empty? ::YARD.parse pattern end |