class Metaractor::Parameters::Parameter
Attributes
name[R]
options[R]
Public Class Methods
new(name, **options)
click to toggle source
# File lib/metaractor/parameters.rb, line 26 def initialize(name, **options) @name = name.to_sym @options = options end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/metaractor/parameters.rb, line 31 def <=>(other) return nil unless other.instance_of? self.class return nil if name == other.name && options != other.options self.name.to_s <=> other.name.to_s end
[](key)
click to toggle source
# File lib/metaractor/parameters.rb, line 37 def [](key) @options[key] end
dig(name, *names)
click to toggle source
# File lib/metaractor/parameters.rb, line 45 def dig(name, *names) @options.dig(name, *names) end
has_key?(key)
click to toggle source
# File lib/metaractor/parameters.rb, line 41 def has_key?(key) @options.has_key?(key) end
merge!(**options)
click to toggle source
# File lib/metaractor/parameters.rb, line 49 def merge!(**options) @options.merge!(**options) end
to_s()
click to toggle source
# File lib/metaractor/parameters.rb, line 53 def to_s name.to_s end
to_sym()
click to toggle source
# File lib/metaractor/parameters.rb, line 57 def to_sym name end