Class: EPIC::Generator

Inherits:
Resource show all
Defined in:
src/epic_generator.rb

Direct Known Subclasses

UUID

Defined Under Namespace

Classes: UUID

Constant Summary

Constant Summary

Constants inherited from Resource

Resource::GLOBAL_LOCK_HASH, Resource::GLOBAL_LOCK_MUTEX

Instance Attribute Summary (collapse)

Attributes included from Rackful::Resource

#get_etag, #get_last_modified, #path

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Resource

#initialize, #lock, lock, #unlock, #xhtml

Methods included from Rackful::Resource

#default_headers, #destroy, #do_METHOD, #empty?, #http_DELETE, #http_GET, #http_HEAD, #http_OPTIONS, #http_PUT, #http_method, #http_methods, included, #requested?, #serializer, #title, #to_struct

Constructor Details

This class inherits a constructor from EPIC::Resource

Instance Attribute Details

- (String) description (readonly)

Returns:



45
46
47
# File 'src/epic_generator.rb', line 45

def description
  @description
end

- (Hash{Symbol => String(description}]) parameters (readonly)

Hash=> String(description]

Returns:

  • (Hash{Symbol => String(description}])

    Hash=> String(description]



42
43
44
# File 'src/epic_generator.rb', line 42

def parameters
  @parameters
end

Class Method Details

+ (Hash{ String(name) => Generator }) [](name)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



33
34
35
# File 'src/epic_generator.rb', line 33

def Generator.[] name
  generators[name.to_s.downcase]
end

+ (Hash{ String(prefix) => Hash{ String(name) => Generator } }) generators

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



27
28
29
# File 'src/epic_generator.rb', line 27

def Generator.generators
  @@generators ||= {}
end

+ (void) inherited(klass)



37
38
39
# File 'src/epic_generator.rb', line 37

def Generator.inherited klass
  generators[klass.name.split('::').last.downcase] = klass
end

Instance Method Details

- (void) generate(request)

Parameters:



# File 'src/epic_generator.rb', line 52

- (void) to_rackful



47
48
49
50
# File 'src/epic_generator.rb', line 47

def to_rackful
  { :description => description,
    :parameters => parameters }
end