Class: Eddy::Build::Loop::Base
- Inherits:
-
Object
- Object
- Eddy::Build::Loop::Base
- Defined in:
- lib/eddy/build/loop/base.rb
Overview
Generate Ruby code from JSON/YAML EDI definitions.
Instance Attribute Summary collapse
- #summary ⇒ Eddy::Summary::Loop
-
#t_set_id ⇒ String
Namespace the Loop is within.
Instance Method Summary collapse
Constructor Details
#initialize(summary, t_set_id) ⇒ void
18 19 20 21 |
# File 'lib/eddy/build/loop/base.rb', line 18 def initialize(summary, t_set_id) self.summary = summary self.t_set_id = t_set_id end |
Instance Attribute Details
#summary ⇒ Eddy::Summary::Loop
10 11 12 |
# File 'lib/eddy/build/loop/base.rb', line 10 def summary @summary end |
#t_set_id ⇒ String
Namespace the Loop is within.
13 14 15 |
# File 'lib/eddy/build/loop/base.rb', line 13 def t_set_id @t_set_id end |
Instance Method Details
#ginny_class ⇒ Ginny::Class
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/eddy/build/loop/base.rb', line 29 def ginny_class() return Ginny::Class.create({ classify_name: false, parent: "Eddy::Models::Loop::Base", name: "Base", description: summary.doc_comment(header: true), body: <<~STR.strip, # @param store [Eddy::Data::Store] # @return [void] def initialize(store) @repeat_limit = #{self.summary.repeat_limit} super(store, Repeat) end STR }) end |
#render ⇒ String
24 25 26 |
# File 'lib/eddy/build/loop/base.rb', line 24 def render() return self.ginny_class.render() end |