Module: Scorm2004::Manifest::Attributes::ClassMethods
- Defined in:
- lib/scorm2004/manifest/attributes.rb
Instance Method Summary collapse
Instance Method Details
#attribute(type, name, options = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/scorm2004/manifest/attributes.rb', line 31 def attribute(type, name, = {}) base = basename(name) attributes << base define_method("raw_#{base}") do @el.at("./@#{name}", NS).try(:content) || [:default].try(:to_s) end send("#{type}_attribute", name, ) attr_reader base end |
#attributes ⇒ Object
27 28 29 |
# File 'lib/scorm2004/manifest/attributes.rb', line 27 def attributes @attributes ||= [] end |