Class: Caricature::MemberDescriptor
- Defined in:
- lib/caricature/descriptor.rb
Overview
Describes a member of a class this contains the metadata needed to generate the member and perhaps a default value for the property type if necessary
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
the name of this member.
-
#return_type ⇒ Object
readonly
the return type of this member.
Instance Method Summary collapse
-
#initialize(name, return_type = nil, is_instance_member = true) ⇒ MemberDescriptor
constructor
initializes a nem instance of member descriptor.
-
#instance_member? ⇒ Boolean
indicates whether this member is a class member or an instance member.
Constructor Details
#initialize(name, return_type = nil, is_instance_member = true) ⇒ MemberDescriptor
initializes a nem instance of member descriptor
48 49 50 |
# File 'lib/caricature/descriptor.rb', line 48 def initialize(name, return_type=nil, is_instance_member=true) @name, @return_type, @instance_member = name, return_type, is_instance_member end |
Instance Attribute Details
#name ⇒ Object (readonly)
the name of this member
45 46 47 |
# File 'lib/caricature/descriptor.rb', line 45 def name @name end |
#return_type ⇒ Object (readonly)
the return type of this member
42 43 44 |
# File 'lib/caricature/descriptor.rb', line 42 def return_type @return_type end |
Instance Method Details
#instance_member? ⇒ Boolean
indicates whether this member is a class member or an instance member
53 54 55 |
# File 'lib/caricature/descriptor.rb', line 53 def instance_member? @instance_member end |