Class: Heroics::GeneratorResource
- Inherits:
-
Object
- Object
- Heroics::GeneratorResource
- Defined in:
- lib/heroics/client_generator.rb
Overview
A representation of a resource for use when generating source code in the template.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#class_name ⇒ Object
The name of the resource class in generated code.
-
#initialize(name, description, links) ⇒ GeneratorResource
constructor
A new instance of GeneratorResource.
Constructor Details
#initialize(name, description, links) ⇒ GeneratorResource
Returns a new instance of GeneratorResource.
50 51 52 53 54 |
# File 'lib/heroics/client_generator.rb', line 50 def initialize(name, description, links) @name = Heroics.ruby_name(name) @description = description @links = links end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
48 49 50 |
# File 'lib/heroics/client_generator.rb', line 48 def description @description end |
#links ⇒ Object (readonly)
Returns the value of attribute links.
48 49 50 |
# File 'lib/heroics/client_generator.rb', line 48 def links @links end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
48 49 50 |
# File 'lib/heroics/client_generator.rb', line 48 def name @name end |
Instance Method Details
#class_name ⇒ Object
The name of the resource class in generated code.
57 58 59 |
# File 'lib/heroics/client_generator.rb', line 57 def class_name Heroics.camel_case(name) end |