Class: Prosereflect::Attribute::Href

Inherits:
Base
  • Object
show all
Defined in:
lib/prosereflect/attribute/href.rb

Constant Summary collapse

PM_TYPE =
'href'

Instance Method Summary collapse

Methods inherited from Base

create, #to_h

Constructor Details

#initialize(options = {}) ⇒ Href

Returns a new instance of Href.



13
14
15
16
17
18
19
20
21
# File 'lib/prosereflect/attribute/href.rb', line 13

def initialize(options = {})
  if options.is_a?(String)
    super()
    self.value = options
  else
    super
    self.value = options[:href] if options[:href]
  end
end