class Seahorse::Client::Plugin::PluginOption
@api private
Attributes
default[RW]
default_block[RW]
doc_default[W]
doc_type[RW]
docstring[RW]
name[R]
required[RW]
Public Class Methods
new(name, options = {})
click to toggle source
# 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
Public Instance Methods
doc_default(options)
click to toggle source
# 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
documented?()
click to toggle source
# File lib/seahorse/client/plugin.rb, line 136 def documented? !!docstring end