Class: Seahorse::Client::Plugin::PluginOption Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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
# File 'lib/seahorse/client/plugin.rb', line 112

def initialize(name, options = {})
  @name = name
  @doc_default = nil
  options.each_pair do |opt_name, opt_value|
    self.send("#{opt_name}=", opt_value)
  end
end

Instance Attribute Details

#defaultObject

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.



121
122
123
# File 'lib/seahorse/client/plugin.rb', line 121

def default
  @default
end

#default_blockObject

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.



122
123
124
# File 'lib/seahorse/client/plugin.rb', line 122

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.



128
129
130
131
132
133
134
# File 'lib/seahorse/client/plugin.rb', line 128

def doc_default(options)
  if @doc_default.nil? && !default.is_a?(Proc)
    default
  else
    @doc_default.respond_to?(:call) ? @doc_default.call(options) : @doc_default
  end
end

#doc_typeObject

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.



124
125
126
# File 'lib/seahorse/client/plugin.rb', line 124

def doc_type
  @doc_type
end

#docstringObject

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.



126
127
128
# File 'lib/seahorse/client/plugin.rb', line 126

def docstring
  @docstring
end

#nameObject (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.



120
121
122
# File 'lib/seahorse/client/plugin.rb', line 120

def name
  @name
end

#requiredObject

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.



123
124
125
# File 'lib/seahorse/client/plugin.rb', line 123

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.

Returns:

  • (Boolean)


136
137
138
# File 'lib/seahorse/client/plugin.rb', line 136

def documented?
  !!docstring
end