Class: Hapyrus::Command::Datasets

Inherits:
Base
  • Object
show all
Defined in:
lib/hapyrus/command/datasets.rb

Instance Method Summary collapse

Methods inherited from Base

#ask, #display_index, #display_show, #hapyrus, #index, #initialize, #show

Constructor Details

This class inherits a constructor from Hapyrus::Command::Base

Instance Method Details

#create(dataset_params = nil) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/hapyrus/command/datasets.rb', line 4

def create(dataset_params=nil)
  dataset_params ||= {:type => "DatasetSmallText"}
  begin
    hapyrus.post(class_name_to_path, :dataset => dataset_params)
  rescue RestClient::Found
    # OK
  end
end