Module: Clerq
- Defined in:
- lib/clerq.rb,
lib/clerq/cli.rb,
lib/clerq/version.rb,
lib/clerq/settings.rb,
lib/clerq/properties.rb,
lib/clerq/entities/node.rb,
lib/clerq/services/service.rb,
lib/clerq/services/read_node.rb,
lib/clerq/services/query_node.rb,
lib/clerq/services/render_erb.rb,
lib/clerq/services/create_node.rb,
lib/clerq/services/render_node.rb,
lib/clerq/services/load_assembly.rb,
lib/clerq/services/check_assembly.rb,
lib/clerq/services/query_template.rb,
lib/clerq/repositories/file_repository.rb,
lib/clerq/repositories/node_repository.rb,
lib/clerq/repositories/text_repository.rb
Defined Under Namespace
Modules: Entities, Properties, Repositories, Services
Classes: Cli, Error, Settings
Constant Summary
collapse
- VERSION =
"0.3.4"
Class Method Summary
collapse
Class Method Details
.assemble(on_parse: nil, on_error: nil) ⇒ Object
78
79
80
81
82
|
# File 'lib/clerq.rb', line 78
def assemble(on_parse: nil, on_error: nil)
node_repository.assemble(
on_parse: on_parse,
on_error: on_error)
end
|
.bin ⇒ Object
36
37
38
|
# File 'lib/clerq.rb', line 36
def bin
settings.bin
end
|
.document ⇒ Object
28
29
30
|
# File 'lib/clerq.rb', line 28
def document
settings.document
end
|
.node_repository ⇒ Object
66
67
68
|
# File 'lib/clerq.rb', line 66
def node_repository
@node_repository ||= NodeRepository.new(path: File.join(Dir.pwd, src))
end
|
.node_repository=(repository) ⇒ Object
70
71
72
73
74
75
76
|
# File 'lib/clerq.rb', line 70
def node_repository=(repository)
unless repository.is_a? NodeRepository
err = "Invalid argument. Clerq::Repositories::NodeRepository required"
raise ArgumentError, err
end
@node_repository = repository
end
|
.reset ⇒ Object
48
49
50
51
52
|
# File 'lib/clerq.rb', line 48
def reset
@settings = nil
@node_repository = nil
@text_repository = nil
end
|
.root ⇒ Object
TODO try forwardable there for bin, tt, title, output, etc.
16
17
18
|
# File 'lib/clerq.rb', line 16
def root
File.dirname __dir__
end
|
.settings ⇒ Object
20
21
22
|
# File 'lib/clerq.rb', line 20
def settings
@settings ||= Settings.new
end
|
.src ⇒ Object
40
41
42
|
# File 'lib/clerq.rb', line 40
def src
settings.src
end
|
.template ⇒ Object
32
33
34
|
# File 'lib/clerq.rb', line 32
def template
settings.template
end
|
.text_repository ⇒ Object
54
55
56
|
# File 'lib/clerq.rb', line 54
def text_repository
@text_repository ||= TextRepository.new(path: File.join(Dir.pwd, tt))
end
|
.text_repository=(repository) ⇒ Object
58
59
60
61
62
63
64
|
# File 'lib/clerq.rb', line 58
def text_repository=(repository)
unless repository.is_a? TextRepository
err = "Invalid argument. Clerq::Repositories::TextRepository required"
raise ArgumentError, err
end
@text_repository = repository
end
|
.title ⇒ Object
24
25
26
|
# File 'lib/clerq.rb', line 24
def title
settings.title
end
|
.tt ⇒ Object
44
45
46
|
# File 'lib/clerq.rb', line 44
def tt
settings.tt
end
|