Skip to content

Can't use multiple clients without prefixes #14

@SteveRedka

Description

@SteveRedka

Currently if you try to use multiple clients in same entity, entity will define methods only from the latest client. As in:

class StubClient < ApiStruct::Client
  def foo
    # do something
  end
end

class AnotherStubClient < ApiStruct::Client
  def bar
    # do something
  end
end

  class StubEntity < ApiStruct::Entity
    client_service StubClient
    client_service AnotherStubClient
  end

It will complain:

> StubEntity.foo
NoMethodError:
  undefined method `foo' for #<AnotherStubClient:0x00000000019128e0>

See also: #13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions