Module: Apipie::DSL::Resource

Included in:
ResourceDescriptionDsl
Defined in:
lib/apipie/dsl_definition.rb

Instance Method Summary collapse

Instance Method Details

#api_base_url(url) ⇒ Object



50
51
52
# File 'lib/apipie/dsl_definition.rb', line 50

def api_base_url(url)
  _apipie_dsl_data[:api_base_url] = url
end

#app_info(app_info) ⇒ Object



63
64
65
# File 'lib/apipie/dsl_definition.rb', line 63

def app_info(app_info)
  _apipie_dsl_data[:app_info] = app_info
end

#name(name) ⇒ Object



46
47
48
# File 'lib/apipie/dsl_definition.rb', line 46

def name(name)
  _apipie_dsl_data[:resource_name] = name
end

#path(path) ⇒ Object



59
60
61
# File 'lib/apipie/dsl_definition.rb', line 59

def path(path)
  _apipie_dsl_data[:path] = path
end

#resource_id(resource_id) ⇒ Object

by default, the resource id is derived from controller_name it can be overwritten with.

resource_id "my_own_resource_id"


42
43
44
# File 'lib/apipie/dsl_definition.rb', line 42

def resource_id(resource_id)
  Apipie.set_resource_id(@controller, resource_id)
end

#short(short) ⇒ Object Also known as: short_description



54
55
56
# File 'lib/apipie/dsl_definition.rb', line 54

def short(short)
  _apipie_dsl_data[:short_description] = short
end