Class: BrickFTP::RESTfulAPI::GetBehavior
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::GetBehavior
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/get_behavior.rb
Overview
Show a behavior
Instance Method Summary collapse
-
#call(id) ⇒ BrickFTP::Types::Behavior?
Returns a single behavior.
Methods included from Command
Instance Method Details
#call(id) ⇒ BrickFTP::Types::Behavior?
Returns a single behavior.
18 19 20 21 22 23 |
# File 'lib/brick_ftp/restful_api/get_behavior.rb', line 18 def call(id) res = client.get("/api/rest/v1/behaviors/#{id}.json") return nil if !res || res.empty? BrickFTP::Types::Behavior.new(**res.symbolize_keys) end |