Class: FileGeneratorService

Inherits:
Object
  • Object
show all
Defined in:
app/services/file_generator_service.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template) ⇒ FileGeneratorService

Returns a new instance of FileGeneratorService.



5
6
7
8
# File 'app/services/file_generator_service.rb', line 5

def initialize(template)
  @template = template
  @theme = template.theme
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template.



3
4
5
# File 'app/services/file_generator_service.rb', line 3

def template
  @template
end

#themeObject (readonly)

Returns the value of attribute theme.



3
4
5
# File 'app/services/file_generator_service.rb', line 3

def theme
  @theme
end

Class Method Details

.create(template) ⇒ Object



10
11
12
# File 'app/services/file_generator_service.rb', line 10

def self.create(template)
  new(template).send :create
end