vendor/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/value.rb
# Calls the value Proc with the appropriate number of arguments
# or returns the raw value if it's a literal
Calls the value Proc with the appropriate number of arguments
or returns the raw value if it's a literal
Calls the value Proc with the appropriate number of arguments or returns the raw value if it ' s a literal
def call_or_value
        return value unless value.respond_to?(:call)
        case value.arity
        when 0
          value.call
        when 1
          value.call(GitHubMetadata.client)
        when 2
          value.call(GitHubMetadata.client, GitHubMetadata.repository)
        else
          raise ArgumentError, "Whoa, arity of 0, 1, or 2 please in your procs."
        end
      end
def call_or_value return value unless value . respond_to? ( :call ) case value . arity when 0 value . call when 1 value . call ( GitHubMetadata . client ) when 2 value . call ( GitHubMetadata . client , GitHubMetadata . repository ) else raise ArgumentError , "Whoa, arity of 0, 1, or 2 please in your procs." end end
Calls the value Proc with the appropriate number of arguments
or returns the raw value if it's a literal
Calls the value Proc with the appropriate number of arguments or returns the raw value if it ' s a literal