Class: Cloudruler::Ruler::Content::Base
- Inherits:
-
Object
- Object
- Cloudruler::Ruler::Content::Base
- Defined in:
- lib/cloudruler/ruler/content/base.rb
Instance Attribute Summary collapse
-
#ruler ⇒ Object
readonly
Returns the value of attribute ruler.
Instance Method Summary collapse
- #build_name(name) ⇒ Object
- #content ⇒ Object
-
#initialize(ruler, annotations, content_hash, options) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(ruler, annotations, content_hash, options) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 12 |
# File 'lib/cloudruler/ruler/content/base.rb', line 7 def initialize(ruler, annotations, content_hash, ) @ruler = ruler @content_hash = content_hash @annotations = annotations @name_suffix = [:resource_name_suffix] end |
Instance Attribute Details
#ruler ⇒ Object (readonly)
Returns the value of attribute ruler.
5 6 7 |
# File 'lib/cloudruler/ruler/content/base.rb', line 5 def ruler @ruler end |
Instance Method Details
#build_name(name) ⇒ Object
20 21 22 |
# File 'lib/cloudruler/ruler/content/base.rb', line 20 def build_name(name) name end |
#content ⇒ Object
14 15 16 17 18 |
# File 'lib/cloudruler/ruler/content/base.rb', line 14 def content @content ||= @content_hash.each_with_object({}) do |(k, v), obj| obj[build_name(k)] = v end end |