Module: KDoc

Defined in:
lib/k_doc/decorators/settings_decorator.rb,
lib/k_doc.rb,
lib/k_doc/model.rb,
lib/k_doc/table.rb,
lib/k_doc/action.rb,
lib/k_doc/csv_doc.rb,
lib/k_doc/version.rb,
lib/k_doc/json_doc.rb,
lib/k_doc/settings.rb,
lib/k_doc/yaml_doc.rb,
lib/k_doc/container.rb,
lib/k_doc/fake_opinion.rb,
lib/k_doc/mixins/datum.rb,
lib/k_doc/mixins/guarded.rb,
lib/k_doc/mixins/taggable.rb,
lib/k_doc/mixins/block_processor.rb,
lib/k_doc/decorators/table_decorator.rb,
lib/k_doc/mixins/composable_components.rb

Overview

This could move into KDecor

Defined Under Namespace

Modules: BlockProcessor, ComposableComponents, Datum, Decorators, Guarded, Taggable Classes: Action, Container, CsvDoc, Error, FakeOpinion, JsonDoc, Model, Settings, Table, YamlDoc

Constant Summary collapse

VERSION =
'0.0.38'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.logObject

Returns the value of attribute log.



81
82
83
# File 'lib/k_doc.rb', line 81

def log
  @log
end

.opinionObject

Returns the value of attribute opinion.



80
81
82
# File 'lib/k_doc.rb', line 80

def opinion
  @opinion
end

Class Method Details

.action(key = nil, **options, &block) ⇒ Object



56
57
58
59
60
# File 'lib/k_doc.rb', line 56

def action(key = nil, **options, &block)
  doc = KDoc::Action.new(key, **options, &block)
  doc.execute_block
  doc
end

.app_settings(key = nil, **options, &block) ⇒ Object



52
53
54
# File 'lib/k_doc.rb', line 52

def app_settings(key = nil, **options, &block)
  model(key, **{ type: :app_settings }.merge(**options), &block)
end

.bootstrap(key = nil, **options, &block) ⇒ Object



48
49
50
# File 'lib/k_doc.rb', line 48

def bootstrap(key = nil, **options, &block)
  model(key, **{ type: :bootstrap }.merge(**options), &block)
end

.csv(key = nil, **options, &block) ⇒ Object



62
63
64
65
66
# File 'lib/k_doc.rb', line 62

def csv(key = nil, **options, &block)
  doc = KDoc::CsvDoc.new(key, **options, &block)
  doc.execute_block
  doc
end

.document(key = nil, **options, &block) ⇒ Object

These need to be registerable



44
45
46
# File 'lib/k_doc.rb', line 44

def document(key = nil, **options, &block)
  model(key, **{ type: :document }.merge(**options), &block)
end

.json(key = nil, **options, &block) ⇒ Object



68
69
70
71
72
# File 'lib/k_doc.rb', line 68

def json(key = nil, **options, &block)
  doc = KDoc::JsonDoc.new(key, **options, &block)
  doc.execute_block
  doc
end

.model(key = nil, **options, &block) ⇒ Object



37
38
39
40
41
# File 'lib/k_doc.rb', line 37

def model(key = nil, **options, &block)
  model = KDoc::Model.new(key, **options, &block)
  model.execute_block
  model
end

.yaml(key = nil, **options, &block) ⇒ Object



74
75
76
77
78
# File 'lib/k_doc.rb', line 74

def yaml(key = nil, **options, &block)
  doc = KDoc::YamlDoc.new(key, **options, &block)
  doc.execute_block
  doc
end