class DuckTesting::Type::Constant

Constants

CONSTANTS

Attributes

constant[R]

Public Class Methods

new(constant) click to toggle source
# File lib/duck_testing/type/constant.rb, line 10
def initialize(constant)
  @constant = constant
end

Public Instance Methods

match?(object) click to toggle source

@param object [Object] @return [Boolean]

# File lib/duck_testing/type/constant.rb, line 16
def match?(object)
  object == constant
end
to_s() click to toggle source

@return [String]

# File lib/duck_testing/type/constant.rb, line 21
def to_s
  constant.to_s
end