class Seahorse::Client::Plugin::PluginOption
@api private
Attributes
default[RW]
default_block[RW]
doc_default[W]
doc_type[RW]
docstring[RW]
name[R]
rbs_type[RW]
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 # 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 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 137 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 145 def documented? !!docstring end