Class: Hippo::BootstrapParser

Inherits:
Object
  • Object
show all
Defined in:
lib/hippo/bootstrap_parser.rb

Constant Summary collapse

TYPES =
%w[placeholder password].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ BootstrapParser

Returns a new instance of BootstrapParser.



14
15
16
# File 'lib/hippo/bootstrap_parser.rb', line 14

def initialize(source)
  @source = source || {}
end

Class Method Details

.parse(source) ⇒ Object



8
9
10
# File 'lib/hippo/bootstrap_parser.rb', line 8

def self.parse(source)
  new(source).parse
end

Instance Method Details

#parseObject



18
19
20
# File 'lib/hippo/bootstrap_parser.rb', line 18

def parse
  parse_hash(@source)
end