Class: Plotlyrb::Grid
- Inherits:
-
Object
- Object
- Plotlyrb::Grid
- Defined in:
- lib/plotlyrb/grid.rb
Instance Method Summary collapse
-
#create(grid_spec) ⇒ Object
data is a hash that mirrors the format of the hash in the API api.plot.ly/v2/grids#create.
-
#initialize(headers) ⇒ Grid
constructor
A new instance of Grid.
Constructor Details
Instance Method Details
#create(grid_spec) ⇒ Object
data is a hash that mirrors the format of the hash in the API api.plot.ly/v2/grids#create
14 15 16 17 18 |
# File 'lib/plotlyrb/grid.rb', line 14 def create(grid_spec) request = Net::HTTP::Post.new(ApiV2::GRIDS.path, @headers) request.body = grid_spec.to_json Response.from_http_response(@https.request(request)) end |