Class: Gapic::Presenters::EnumValuePresenter
- Inherits:
-
Object
- Object
- Gapic::Presenters::EnumValuePresenter
- Defined in:
- lib/gapic/presenters/enum_value_presenter.rb
Overview
A presenter for proto enum values.
Instance Method Summary collapse
- #doc_description ⇒ Object
-
#initialize(value) ⇒ EnumValuePresenter
constructor
A new instance of EnumValuePresenter.
-
#name ⇒ String
The enum value name without keyword collision.
- #number ⇒ Object
Constructor Details
#initialize(value) ⇒ EnumValuePresenter
Returns a new instance of EnumValuePresenter.
25 26 27 |
# File 'lib/gapic/presenters/enum_value_presenter.rb', line 25 def initialize value @value = value end |
Instance Method Details
#doc_description ⇒ Object
34 35 36 |
# File 'lib/gapic/presenters/enum_value_presenter.rb', line 34 def doc_description @value.docs_leading_comments end |
#name ⇒ String
Returns The enum value name without keyword collision.
30 31 32 |
# File 'lib/gapic/presenters/enum_value_presenter.rb', line 30 def name Gapic::RubyInfo.keywords.include?(@value.name) ? "#{@value.parent.name}::#{@value.name}" : @value.name end |
#number ⇒ Object
38 39 40 |
# File 'lib/gapic/presenters/enum_value_presenter.rb', line 38 def number @value.number end |