Sha256: 5728db85690c83f7e5f4861eccfd3ed7e5cd87d47f039c798aa90d096fc70e57

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

class Module

  # These a school of thought that says an attribute
  # show always have a reader and a writer.
  #
  def attr(*args)
    args.pop unless args.last.is_a?(Symbol) or args.last.is_a?(String)
    attr_accessor *args
    args.collect{ |a| [ :"#{a}", :"#{a}=" ] }.flatten
  end

end



#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# TODO

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.9.0 lib/nano/module/attr.rb
facets-1.0.0 lib/facet/module/attr.rb
facets-1.0.3 packages/core/lib/facet/module/attr.rb