Class: Seahorse::Client::Plugin::PluginOption Private
- Inherits:
-
Object
- Object
- Seahorse::Client::Plugin::PluginOption
- Defined in:
- lib/seahorse/client/plugin.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #default ⇒ Object private
- #default_block ⇒ Object private
- #doc_default(options) ⇒ Object private
- #doc_type ⇒ Object private
- #docstring ⇒ Object private
- #name ⇒ Object readonly private
- #rbs_type ⇒ Object private
- #required ⇒ Object private
Instance Method Summary collapse
- #documented? ⇒ Boolean private
-
#initialize(name, options = {}) ⇒ PluginOption
constructor
private
A new instance of PluginOption.
Constructor Details
#initialize(name, options = {}) ⇒ PluginOption
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PluginOption.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/seahorse/client/plugin.rb', line 112 def initialize(name, = {}) @name = name # prevent unstable object shapes by ensuring # order and presence of instance variables @default = nil @default_block = nil @required = nil @doc_type = nil @doc_default = nil @docstring = nil @rbs_type = nil .each_pair do |opt_name, opt_value| self.send("#{opt_name}=", opt_value) end end |
Instance Attribute Details
#default ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
129 130 131 |
# File 'lib/seahorse/client/plugin.rb', line 129 def default @default end |
#default_block ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
130 131 132 |
# File 'lib/seahorse/client/plugin.rb', line 130 def default_block @default_block end |
#doc_default(options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
137 138 139 140 141 142 143 |
# File 'lib/seahorse/client/plugin.rb', line 137 def doc_default() if @doc_default.nil? && !default.is_a?(Proc) default else @doc_default.respond_to?(:call) ? @doc_default.call() : @doc_default end end |
#doc_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
132 133 134 |
# File 'lib/seahorse/client/plugin.rb', line 132 def doc_type @doc_type end |
#docstring ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
134 135 136 |
# File 'lib/seahorse/client/plugin.rb', line 134 def docstring @docstring end |
#name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
128 129 130 |
# File 'lib/seahorse/client/plugin.rb', line 128 def name @name end |
#rbs_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
135 136 137 |
# File 'lib/seahorse/client/plugin.rb', line 135 def rbs_type @rbs_type end |
#required ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
131 132 133 |
# File 'lib/seahorse/client/plugin.rb', line 131 def required @required end |
Instance Method Details
#documented? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
145 146 147 |
# File 'lib/seahorse/client/plugin.rb', line 145 def documented? !!docstring end |