Class: BSB::BaseGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/bsb/base_generator.rb

Direct Known Subclasses

BankListGenerator, DatabaseGenerator

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hashObject (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

#jsonObject



13
14
15
# File 'lib/bsb/base_generator.rb', line 13

def json
  JSON.pretty_generate(@hash)
end