class Atum::Generation::GeneratorResource
Public Class Methods
new(resource_schema)
click to toggle source
# File lib/atum/generation/generator_resource.rb, line 4 def initialize(resource_schema) @resource_schema = resource_schema end
Public Instance Methods
class_name()
click to toggle source
The name of the resource class in generated code.
# File lib/atum/generation/generator_resource.rb, line 26 def class_name name.camelcase end
description()
click to toggle source
Description of the resource.
# File lib/atum/generation/generator_resource.rb, line 14 def description @resource_schema.description end
links()
click to toggle source
Links available on this resource.
# File lib/atum/generation/generator_resource.rb, line 19 def links @links ||= @resource_schema.link_schemas.map do |link_schema| GeneratorLink.new(link_schema) end end
name()
click to toggle source
The name of the resource, in snake case.
# File lib/atum/generation/generator_resource.rb, line 9 def name @resource_schema.name.gsub('-', '_') end