Class: Bri::Match::Method
- Includes:
- Templates::Helpers
- Defined in:
- lib/bri/match/method.rb
Constant Summary collapse
- TEMPLATE =
Bri::Templates::METHOD_DESCRIPTION
Instance Attribute Summary collapse
-
#call_syntaxes ⇒ Object
Returns the value of attribute call_syntaxes.
-
#description_paragraphs ⇒ Object
Returns the value of attribute description_paragraphs.
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#origin ⇒ Object
Returns the value of attribute origin.
Instance Method Summary collapse
-
#initialize(rdoc_method, store = nil) ⇒ Method
constructor
A new instance of Method.
Methods included from Templates::Helpers
hrule, #print_origin, section_header
Methods inherited from Base
Constructor Details
#initialize(rdoc_method, store = nil) ⇒ Method
Returns a new instance of Method.
9 10 11 12 13 14 15 16 17 |
# File 'lib/bri/match/method.rb', line 9 def initialize( rdoc_method, store = nil ) @full_name = rdoc_method.full_name @call_syntaxes = rdoc_method.arglists.lines( chomp: true ). map { |e| e.prepend( " " ) }. join( "\n" ) + "\n" rescue '' @description_paragraphs = build_description_from_comment( rdoc_method.comment ) @origin = store&.friendly_path end |
Instance Attribute Details
#call_syntaxes ⇒ Object
Returns the value of attribute call_syntaxes.
7 8 9 |
# File 'lib/bri/match/method.rb', line 7 def call_syntaxes @call_syntaxes end |
#description_paragraphs ⇒ Object
Returns the value of attribute description_paragraphs.
7 8 9 |
# File 'lib/bri/match/method.rb', line 7 def description_paragraphs @description_paragraphs end |
#full_name ⇒ Object
Returns the value of attribute full_name.
7 8 9 |
# File 'lib/bri/match/method.rb', line 7 def full_name @full_name end |
#origin ⇒ Object
Returns the value of attribute origin.
7 8 9 |
# File 'lib/bri/match/method.rb', line 7 def origin @origin end |