Class: BSB::BaseGenerator
- Inherits:
-
Object
- Object
- BSB::BaseGenerator
- Defined in:
- lib/bsb/base_generator.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
-
#initialize(hash) ⇒ BaseGenerator
constructor
A new instance of BaseGenerator.
- #json ⇒ Object
Constructor Details
#initialize(hash) ⇒ BaseGenerator
Returns a new instance of BaseGenerator.
9 10 11 |
# File 'lib/bsb/base_generator.rb', line 9 def initialize(hash) @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
7 8 9 |
# File 'lib/bsb/base_generator.rb', line 7 def hash @hash end |
Instance Method Details
#json ⇒ Object
13 14 15 |
# File 'lib/bsb/base_generator.rb', line 13 def json JSON.pretty_generate(@hash) end |