Class: Graphiti::OpenAPI::Actions

Inherits:
Hash
  • Object
show all
Defined in:
app/models/graphiti/open_api/action.rb

Class Method Summary collapse

Class Method Details

.load(endpoint, data: ) ⇒ Object



124
125
126
127
128
# File 'app/models/graphiti/open_api/action.rb', line 124

def self.load(endpoint, data: endpoint.__attributes__[:actions])
  data.map do |action, data|
    Action.new(data.to_hash.merge(endpoint: endpoint, action: action))
  end
end