Class: ActiveRemote::Type::Registration
- Inherits:
-
Object
- Object
- ActiveRemote::Type::Registration
- Defined in:
- lib/active_remote/type/registry.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#typecaster ⇒ Object
readonly
Returns the value of attribute typecaster.
Instance Method Summary collapse
-
#initialize(name, typecaster) ⇒ Registration
constructor
A new instance of Registration.
- #matches?(type_name) ⇒ Boolean
Constructor Details
#initialize(name, typecaster) ⇒ Registration
Returns a new instance of Registration.
35 36 37 38 |
# File 'lib/active_remote/type/registry.rb', line 35 def initialize(name, typecaster) @name = name @typecaster = typecaster end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'lib/active_remote/type/registry.rb', line 33 def name @name end |
#typecaster ⇒ Object (readonly)
Returns the value of attribute typecaster.
33 34 35 |
# File 'lib/active_remote/type/registry.rb', line 33 def typecaster @typecaster end |
Instance Method Details
#matches?(type_name) ⇒ Boolean
40 41 42 |
# File 'lib/active_remote/type/registry.rb', line 40 def matches?(type_name) type_name == name end |