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.



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

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

Class Method Details

.parse(source) ⇒ Object



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

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

Instance Method Details

#parseObject



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

def parse
  parse_hash(@source)
end