Class: Avro::Builder::Rake::AvroGenerateTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/avro/builder/rake/avro_generate_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: :generate, dependencies: []) {|_self| ... } ⇒ AvroGenerateTask

Returns a new instance of AvroGenerateTask.

Yields:

  • (_self)

Yield Parameters:



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 12

def initialize(name: :generate, dependencies: [])
  @name = name
  @task_namespace = :avro
  @task_desc = 'Generate Avro schema files from Avro::Builder DSL'
  @load_paths = []
  @root = "#{Rails.root}/avro/dsl" if defined?(Rails)
  @dependencies = dependencies
  @filetype = 'avsc'

  yield self if block_given?

  define
end

Instance Attribute Details

#dependenciesObject

Returns the value of attribute dependencies.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def dependencies
  @dependencies
end

#filetypeObject

Returns the value of attribute filetype.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def filetype
  @filetype
end

#load_pathsObject

Returns the value of attribute load_paths.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def load_paths
  @load_paths
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def name
  @name
end

#rootObject

Returns the value of attribute root.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def root
  @root
end

#task_descObject

Returns the value of attribute task_desc.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def task_desc
  @task_desc
end

#task_namespaceObject

Returns the value of attribute task_namespace.



9
10
11
# File 'lib/avro/builder/rake/avro_generate_task.rb', line 9

def task_namespace
  @task_namespace
end