Sha256: cf3f7a4942399b272179468eaee030b9f73250c8f5b6919e4bfaa7407859377d

Contents?: true

Size: 948 Bytes

Versions: 1

Compression:

Stored size: 948 Bytes

Contents

class MethodMixin {
  def documentation {
    Fancy Documentation for: (executable())
  }

  def documentation: str {
    Fancy Documentation for: (executable()) is: str
  }

  def visibility {
    """
    Returns the visibility ('private, 'protected, 'public) of a @Method@ in its defined context, if any.
    """
    entry = @defined_in method_table() lookup(@name)
    { entry visibility() } if: entry
  }

  def public? {
    """
    Returns true, if the @Method@ is public in its defined context.
    """
    visibility == 'public
  }

  def protected? {
    """
    Returns true, if the @Method@ is protected in its defined context.
    """
    visibility == 'protected
  }

  def private? {
    """
    Returns true, if the @Method@ is private in its defined context.
    """
    visibility == 'private
  }
}

class Method {
  ruby_alias: 'arity
  include: MethodMixin
}

class UnboundMethod {
  ruby_alias: 'arity
  include: MethodMixin
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fancy-0.3.3 lib/rbx/method.fy