mirror of
https://github.com/usetrmnl/trmnl-api.git
synced 2026-04-29 13:35:13 -07:00
Added endpoints custom inspection
Necessary to reduce object inspection verbosity especially with Dry Schema objects. Milestone: minor
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "inspectable"
|
||||
require "pipeable"
|
||||
|
||||
module TRMNL
|
||||
@@ -13,6 +14,7 @@ module TRMNL
|
||||
model: "models.current_screen"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Pipeable
|
||||
|
||||
def call token:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "inspectable"
|
||||
require "pipeable"
|
||||
|
||||
module TRMNL
|
||||
@@ -13,6 +14,7 @@ module TRMNL
|
||||
model: "models.display"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Pipeable
|
||||
|
||||
def call token:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "inspectable"
|
||||
require "pipeable"
|
||||
|
||||
module TRMNL
|
||||
@@ -13,6 +14,7 @@ module TRMNL
|
||||
model: "models.firmware"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Pipeable
|
||||
|
||||
def call
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "inspectable"
|
||||
require "pipeable"
|
||||
|
||||
module TRMNL
|
||||
@@ -13,6 +14,7 @@ module TRMNL
|
||||
model: "models.setup"
|
||||
]
|
||||
|
||||
include Inspectable[contract: :class]
|
||||
include Pipeable
|
||||
|
||||
def call id:
|
||||
|
||||
@@ -63,4 +63,8 @@ RSpec.describe TRMNL::API::Endpoints::CurrentScreen do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,4 +69,8 @@ RSpec.describe TRMNL::API::Endpoints::Display do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,4 +57,8 @@ RSpec.describe TRMNL::API::Endpoints::Firmware do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
end
|
||||
end
|
||||
|
||||
@@ -63,4 +63,8 @@ RSpec.describe TRMNL::API::Endpoints::Setup do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#inspect" do
|
||||
it_behaves_like "an inspectable endpoint", described_class.new
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user