class Docks::Containers::Function
Public: a container for Function
symbols.
Public Class Methods
type()
click to toggle source
# File lib/docks/containers/function_container.rb, line 8 def self.type; Docks::Types::Symbol::FUNCTION end
Public Instance Methods
instance?()
click to toggle source
# File lib/docks/containers/function_container.rb, line 11 def instance?; !static? end
method?()
click to toggle source
# File lib/docks/containers/function_container.rb, line 12 def method?; fetch(:method, false) end
static?()
click to toggle source
# File lib/docks/containers/function_container.rb, line 10 def static?; fetch(:static, false) end
summary()
click to toggle source
Calls superclass method
# File lib/docks/containers/function_container.rb, line 24 def summary summary = super summary.static = static? summary.method = method? summary.for = fetch(:for, nil) summary end
symbol_id()
click to toggle source
Calls superclass method
# File lib/docks/containers/function_container.rb, line 14 def symbol_id return super unless method? "method-#{"static-" if static?}#{self[:for]}-#{self[:name]}" end
to_descriptor()
click to toggle source
Calls superclass method
# File lib/docks/containers/function_container.rb, line 19 def to_descriptor return super unless method? "#{belongs_to.to_descriptor}#{static? ? "." : "#"}#{fetch(:name)}" end
Protected Instance Methods
matches_exactly?(descriptor)
click to toggle source
Calls superclass method
# File lib/docks/containers/function_container.rb, line 34 def matches_exactly?(descriptor) name = fetch(:name, nil) is_method = method? matches = (!is_method && super) || (is_method && instance? && descriptor.instance_member == name) || (is_method && static? && descriptor.static_member == name) matches && self end