Sha256: 20a123356ce83bbec694467e77ba666f09cd69744ff58cd8d016c8a340c82ec6
Contents?: true
Size: 758 Bytes
Versions: 28
Compression:
Stored size: 758 Bytes
Contents
module PDoc module Models class Argument < Base attr_reader :name attr_reader :default_value def attach_to_parent(parent) parent.arguments << self end # returns the argument's id in the form # method_id:argument_name. So, for example: # document.querySelectorAll:cssSelector def id @id ||= "#{parent.id}:#{name}" end def optional? !!@optional end def types @types ||= [] end def to_hash { :name => name, :description => description, :default_value => default_value, :optional => optional?, :types => types } end end end end
Version data entries
28 entries across 28 versions & 2 rubygems