Sha256: debe8c7127ffdd884e87d88bdaee091e3d552b0d4a74af922fbe8bd4c7bf0872

Contents?: true

Size: 377 Bytes

Versions: 31

Compression:

Stored size: 377 Bytes

Contents

module ActiveMocker
  module AliasAttribute
    # Is +new_name+ an alias?
    def attribute_alias?(new_name)
      attribute_aliases.key? new_name.to_s
    end

    # Returns the original name for the alias +name+
    def attribute_alias(name)
      attribute_aliases[name.to_s]
    end

    private

    def attribute_aliases
      @attribute_aliases ||= {}
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
active_mocker-2.6.2 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.6.1.beta2 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.6.1.beta lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.6.0 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.5.4 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.5.3 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.5.2 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.5.1 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.5.1.pre lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.5.0 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.4 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.3 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.2 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.1 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.0 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.0.pre5 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.3.4 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.0.pre4 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.0.pre3 lib/active_mocker/mock/alias_attribute.rb
active_mocker-2.4.0.pre2 lib/active_mocker/mock/alias_attribute.rb