Class: Rbind::RGetter

Inherits:
ROperation show all
Defined in:
lib/rbind/core/rgetter.rb

Instance Attribute Summary collapse

Attributes inherited from ROperation

#ambiguous_name, #base_class, #cparameters, #index, #parameters, #return_type

Attributes inherited from RBase

#alias, #auto_alias, #cname, #csignature, #flags, #ignore, #name, #namespace, #owner, #version

Instance Method Summary collapse

Methods inherited from ROperation

#==, #abstract?, #ambiguous_name?, #constructor?, #generate_signatures, #inherit?, #instance_method?, #operator, #operator?, #owner=, #parameter, #pretty_print, #static?, #valid_flags

Methods inherited from RBase

#add_flag, basename, #binding, #full_name, #generate_signatures, #ignore?, #map_to_namespace, namespace, #namespace?, normalize, #pretty_print, to_cname, #valid_flags, #validate_flags

Constructor Details

#initialize(attr) ⇒ RGetter

Returns a new instance of RGetter.



6
7
8
9
# File 'lib/rbind/core/rgetter.rb', line 6

def initialize(attr)
    @attribute = attr
    super("get_#{attr.name}",attr.type)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



4
5
6
# File 'lib/rbind/core/rgetter.rb', line 4

def attribute
  @attribute
end

Instance Method Details

#attribute?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/rbind/core/rgetter.rb', line 11

def attribute?
    true
end

#signatureObject



15
16
17
# File 'lib/rbind/core/rgetter.rb', line 15

def signature
    attribute.signature
end