Class: CommaParty::ParseAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/commaparty/parse_attributes.rb

Instance Method Summary collapse

Constructor Details

#initialize(element) ⇒ ParseAttributes

Returns a new instance of ParseAttributes.



4
5
6
# File 'lib/commaparty/parse_attributes.rb', line 4

def initialize(element)
  @attributes = element[1]
end

Instance Method Details

#callObject



8
9
10
11
12
13
14
# File 'lib/commaparty/parse_attributes.rb', line 8

def call
  if @attributes.is_a?(Hash)
    @attributes
  else
    {}
  end
end