Class: Heroics::GeneratorLink
- Inherits:
-
Object
- Object
- Heroics::GeneratorLink
- Defined in:
- lib/heroics/client_generator.rb
Overview
A representation of a link for use when generating source code in the template.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#takes_body ⇒ Object
readonly
Returns the value of attribute takes_body.
Instance Method Summary collapse
-
#initialize(name, description, parameters, takes_body) ⇒ GeneratorLink
constructor
A new instance of GeneratorLink.
-
#method_signature ⇒ Object
list of parameters for method signature, body is optional.
-
#parameter_names ⇒ Object
list of parameters to pass along from method signature to client calls.
Constructor Details
#initialize(name, description, parameters, takes_body) ⇒ GeneratorLink
Returns a new instance of GeneratorLink.
67 68 69 70 71 72 73 74 |
# File 'lib/heroics/client_generator.rb', line 67 def initialize(name, description, parameters, takes_body) @name = Heroics.ruby_name(name) @description = description @parameters = parameters if takes_body parameters << BodyParameter.new end end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
65 66 67 |
# File 'lib/heroics/client_generator.rb', line 65 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
65 66 67 |
# File 'lib/heroics/client_generator.rb', line 65 def name @name end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
65 66 67 |
# File 'lib/heroics/client_generator.rb', line 65 def parameters @parameters end |
#takes_body ⇒ Object (readonly)
Returns the value of attribute takes_body.
65 66 67 |
# File 'lib/heroics/client_generator.rb', line 65 def takes_body @takes_body end |