Class: MdSplitter::ElfManifestBuilder
- Inherits:
-
Object
- Object
- MdSplitter::ElfManifestBuilder
- Defined in:
- lib/md_splitter/elf_manifest_builder.rb
Instance Method Summary collapse
-
#build(raw_obj, requested_id) ⇒ Object
-
Args : - ++ -> * Returns : - * Raises : - ++ ->.
-
-
#initialize ⇒ ElfManifestBuilder
constructor
-
Args : - ++ -> * Returns : - * Raises : - ++ ->.
-
- #json ⇒ Object
-
#raw ⇒ Object
Accepts an ennumerable object and returns a json manifest.
Constructor Details
#initialize ⇒ ElfManifestBuilder
-
Args :
-
++ ->
-
-
Returns : -
-
Raises :
-
++ ->
-
18 19 20 21 |
# File 'lib/md_splitter/elf_manifest_builder.rb', line 18 def initialize @raw_object = {} @logger = Logger.new(STDOUT) end |
Instance Method Details
#build(raw_obj, requested_id) ⇒ Object
-
Args :
-
++ ->
-
-
Returns : -
-
Raises :
-
++ ->
-
32 33 34 |
# File 'lib/md_splitter/elf_manifest_builder.rb', line 32 def build raw_obj, requested_id @raw_object = build_manifest_object raw_obj, requested_id end |
#json ⇒ Object
49 50 51 52 |
# File 'lib/md_splitter/elf_manifest_builder.rb', line 49 def json puts "Generating json string from #{@raw_object}" JSON.pretty_generate @raw_object end |
#raw ⇒ Object
Accepts an ennumerable object and returns a json manifest
-
Args :
-
items -> OBJECT from which to build the manifest
-
-
Returns :
-
JSON manifest
-
-
Raises :
-
++ ->
-
45 46 47 |
# File 'lib/md_splitter/elf_manifest_builder.rb', line 45 def raw @raw_object end |