Skip to content

Commit

Permalink
Allow #blank? and #private_methods on results ⬜️ (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny authored May 27, 2024
1 parent 6c5f2e1 commit afa316e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/service_actor/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def to_result(data)
kind_of?
nil?
object_id
private_methods
public_send
send
tap
Expand All @@ -29,6 +30,7 @@ def to_result(data)
end

alias_method :yield_self, :then
alias_method :blank?, :nil?

def initialize(data = {})
@data = data.to_h
Expand Down
2 changes: 2 additions & 0 deletions spec/service_actor/result_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
:[],
:[]=,
:==,
:blank?,
:block_given?,
:class,
:deconstruct_keys,
Expand All @@ -40,6 +41,7 @@
:nil?,
:object_id,
:pretty_print,
:private_methods,
:public_send,
:respond_to?,
:send,
Expand Down

0 comments on commit afa316e

Please sign in to comment.