class Service::Generators::EntityGenerator

Public Instance Methods

create_micros() click to toggle source
# File lib/generators/service/entity/entity_generator.rb, line 11
def create_micros
  entities.each do |m|
    @entity = m.classify

    path = "#{service_path}/entities/#{m.underscore}.rb"
    template 'entity.rb.erb', path
  end
end

Private Instance Methods

service_name() click to toggle source
# File lib/generators/service/entity/entity_generator.rb, line 22
def service_name
  Service::Helper.service_name(name)
end
service_path() click to toggle source
# File lib/generators/service/entity/entity_generator.rb, line 26
def service_path
  Service::Helper.service_path(name)
end
spec_path() click to toggle source
# File lib/generators/service/entity/entity_generator.rb, line 30
def spec_path
  Service::Helper.spec_path(name)
end